-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve(ui): ProTable expandable, empty and footer style follow Table
- Loading branch information
1 parent
9e21396
commit 769a0ec
Showing
7 changed files
with
117 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import { ProTable } from '@oceanbase/ui'; | ||
|
||
const App: React.FC = () => { | ||
const columns = [ | ||
{ | ||
title: '姓名', | ||
dataIndex: 'name', | ||
key: 'name', | ||
}, | ||
{ | ||
title: '年龄', | ||
dataIndex: 'age', | ||
key: 'age', | ||
}, | ||
{ | ||
title: '住址', | ||
dataIndex: 'address', | ||
key: 'address', | ||
}, | ||
]; | ||
|
||
return <ProTable headerTitle="高级表格" cardBordered={true} columns={columns} dataSource={[]} />; | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import { ProTable } from '@oceanbase/ui'; | ||
|
||
const App: React.FC = () => { | ||
const columns = [ | ||
{ | ||
title: '姓名', | ||
dataIndex: 'name', | ||
key: 'name', | ||
}, | ||
{ | ||
title: '年龄', | ||
dataIndex: 'age', | ||
key: 'age', | ||
}, | ||
{ | ||
title: '住址', | ||
dataIndex: 'address', | ||
key: 'address', | ||
}, | ||
]; | ||
|
||
const dataSource = []; | ||
for (let i = 1; i < 100; i++) { | ||
dataSource.push({ | ||
key: i, | ||
name: '胡彦斌' + i, | ||
age: 32, | ||
address: `西湖区湖底公园${i}号`, | ||
}); | ||
} | ||
|
||
return ( | ||
<ProTable | ||
headerTitle="高级表格" | ||
cardBordered={true} | ||
columns={columns} | ||
dataSource={dataSource} | ||
expandable={{ | ||
expandedRowRender: record => <p>{record.address}</p>, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters