-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from kne-union/release
Release
- Loading branch information
Showing
14 changed files
with
722 additions
and
166 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const { CentralContent } = _InfoPage; | ||
|
||
const BaseExample = () => { | ||
return (<CentralContent dataSource={{ | ||
id: 'RC00101', | ||
name: '张三', | ||
birthday: '2020-03-03', | ||
addTime: new Date(), | ||
count: 2000.1322, | ||
count2: 0.01234565, | ||
count3: 1234523, | ||
description: `描述描述描述描述描述描述描述描述\n描述描述描述描述描述描述描述描述\n描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述`, | ||
description2: `描述描述描述描述描述描述描述描述` | ||
}} col={3} columns={[{ | ||
name: 'id', title: 'ID', block: true | ||
}, { | ||
name: 'name', title: '姓名', span: 10 | ||
}, { | ||
name: 'birthday', title: '出生日期', format: 'date' | ||
}, { | ||
name: 'addTime', title: '添加时间', format: 'datetime' | ||
}, { | ||
name: 'count', title: '数量', format: 'number' | ||
}, { | ||
name: 'count2', title: '百分比', format: 'number-percent money-百分比' | ||
}, { | ||
name: 'count3', title: '万元', format: 'number--10000', render: (value) => `${value}万元` | ||
}, { | ||
name: 'empty', title: '空值显示' | ||
}, { | ||
name: 'empty2', title: '空值显示2', placeholder: '空' | ||
}, { | ||
name: 'empty3', title: '空值显示3', emptyIsPlaceholder: false | ||
}, { | ||
name: 'description', title: '描述' | ||
}, { | ||
name: 'description2', title: '描述' | ||
}]} />); | ||
}; | ||
|
||
render(<BaseExample />); |
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 |
---|---|---|
@@ -1,43 +1,85 @@ | ||
const { TableView } = _InfoPage; | ||
const { Flex } = antd; | ||
const { useState } = React; | ||
|
||
const dataSource = [{ | ||
id: 'RC00101', | ||
name: '张三', | ||
birthday: '2020-03-03', | ||
addTime: new Date(), | ||
count: 2000.1322, | ||
count2: 0.01234565, | ||
count3: 1234523, | ||
description: `描述描述描述描述描述描述描述描述` | ||
}, { | ||
id: 'RC00102', | ||
name: '李四', | ||
birthday: '2020-03-03', | ||
addTime: new Date(), | ||
count: 2000.1322, | ||
count2: 0.01234565, | ||
count3: 1234523, | ||
description: `描述描述描述描述描述描述描述描述` | ||
}, { | ||
id: 'RC00103', | ||
name: '王五', | ||
birthday: '2020-03-03', | ||
addTime: new Date(), | ||
count: 2000.1322, | ||
count2: 0.01234565, | ||
count3: 1234523, | ||
description: `描述描述描述描述描述描述描述描述` | ||
}, { | ||
id: 'RC00104', | ||
name: '马七', | ||
birthday: '2020-03-03', | ||
addTime: new Date(), | ||
count: 2000.1322, | ||
count2: 0.01234565, | ||
count3: 1234523, | ||
description: `描述描述描述描述描述描述描述描述` | ||
}]; | ||
|
||
const columns = [{ | ||
name: 'id', title: 'ID' | ||
}, { | ||
name: 'name', title: '姓名' | ||
}, { | ||
name: 'birthday', title: '出生日期', format: 'date' | ||
}, { | ||
name: 'addTime', title: '添加时间', format: 'datetime' | ||
}, { | ||
name: 'count', title: '数量', format: 'number' | ||
}, { | ||
name: 'description', title: '描述', span: 10 | ||
}]; | ||
|
||
const WithCheckbox = () => { | ||
const [selectKeys, setSelectKeys] = useState([]); | ||
return <TableView dataSource={dataSource} columns={columns} rowSelection={{ | ||
type: 'checkbox', allowSelectedAll: true, selectedRowKeys: selectKeys, onChange: setSelectKeys | ||
}} />; | ||
}; | ||
|
||
const WithSelected = () => { | ||
const [selectKeys, setSelectKeys] = useState([]); | ||
return <TableView dataSource={dataSource} columns={columns} rowSelection={{ | ||
selectedRowKeys: selectKeys, onChange: setSelectKeys | ||
}} />; | ||
}; | ||
|
||
const BaseExample = () => { | ||
return (<TableView dataSource={{ | ||
id: 'RC00101', | ||
name: '张三', | ||
birthday: '2020-03-03', | ||
addTime: new Date(), | ||
count: 2000.1322, | ||
count2: 0.01234565, | ||
count3: 1234523, | ||
description: `描述描述描述描述描述描述描述描述\n描述描述描述描述描述描述描述描述\n描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述`, | ||
description2: `描述描述描述描述描述描述描述描述` | ||
}} col={3} columns={[{ | ||
name: 'id', title: 'ID', block: true | ||
}, { | ||
name: 'name', title: '姓名', span: 10 | ||
}, { | ||
name: 'birthday', title: '出生日期', format: 'date' | ||
}, { | ||
name: 'addTime', title: '添加时间', format: 'datetime' | ||
}, { | ||
name: 'count', title: '数量', format: 'number' | ||
}, { | ||
name: 'count2', title: '百分比', format: 'number-percent money-百分比' | ||
}, { | ||
name: 'count3', title: '万元', format: 'number--10000', render: (value) => `${value}万元` | ||
}, { | ||
name: 'empty', title: '空值显示' | ||
}, { | ||
name: 'empty2', title: '空值显示2', placeholder: '空' | ||
}, { | ||
name: 'empty3', title: '空值显示3', emptyIsPlaceholder: false | ||
}, { | ||
name: 'description', title: '描述' | ||
}, { | ||
name: 'description2', title: '描述' | ||
}, { | ||
name: 'end', title: '尾行优化' | ||
}]} />); | ||
return <Flex vertical gap={10}> | ||
<TableView dataSource={dataSource} columns={columns} /> | ||
<WithCheckbox /> | ||
<WithSelected /> | ||
<TableView dataSource={[]} columns={columns} /> | ||
<div style={{ | ||
height: '200px', overflowY: 'scroll' | ||
}}> | ||
<TableView dataSource={dataSource} columns={columns} sticky/> | ||
</div> | ||
</Flex>; | ||
}; | ||
|
||
render(<BaseExample />); |
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
File renamed without changes.
Oops, something went wrong.