-
Notifications
You must be signed in to change notification settings - Fork 7
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 #728 from ShuyunFF2E/mly-cTable-0825
表格问题修复(表格标题:问号提示、排序、筛选 同时存在时,样式优化)
- Loading branch information
Showing
36 changed files
with
1,172 additions
and
654 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 |
---|---|---|
@@ -1,36 +1,48 @@ | ||
--- | ||
order: 1 | ||
title: CTable | ||
desc: 默认表格 | ||
order: 1 title: CTable desc: 默认表格 | ||
--- | ||
|
||
```jsx | ||
import React from 'react'; | ||
import { CTable } from 'cloud-react'; | ||
|
||
const data = [ | ||
{ id: '121410327', name: '手机号优先继续发送1', createTime: '2021/12/14 10:19:02', creator: 'liyuan.meng', num: '12,222' }, | ||
{ id: '121410327', name: '手机号优先继续发送1', createTime: '2021/12/14 10:19:02', creator: 'liyuan.meng', num: '12222' }, | ||
{ id: '121410328', name: 'ouid疲劳度3', createTime: '2021/12/13 15:47:33 ', creator: 'jiaojiao.diao', num: '198' }, | ||
{ id: '121410329', name: '继续发送手机1', createTime: '2021/12/13 15:36:42', creator: 'nan.run', num: '1,232' }, | ||
{ id: '121408294', name: '继续发送手机2', createTime: '2021/12/13 11:14:40', creator: 'xiaotong.fan', num: '12,122,112' }, | ||
{ id: '121407191', name: '继续发送手机3', createTime: '2021/12/13 11:03:05', creator: 'zhenxiao.guo', num: '1000,000' }, | ||
{ id: '121410329', name: '继续发送手机1', createTime: '2021/12/13 15:36:42', creator: 'nan.run', num: 1232 }, | ||
{ id: '121408294', name: '继续发送手机2', createTime: '2021/12/13 11:14:40', creator: 'xiaotong.fan', num: 12122112 }, | ||
{ id: '121407191', name: '继续发送手机3', createTime: '2021/12/13 11:03:05', creator: 'zhenxiao.guo', num: 1000000 }, | ||
]; | ||
|
||
const columns = [ | ||
{ title: '活动ID', dataIndex: 'id', width: 130 }, | ||
{ title: '活动名称', dataIndex: 'name', width: 140 }, | ||
{ title: '创建时间', dataIndex: 'createTime', width: 140 }, | ||
{ title: '人数', dataIndex: 'num', align: 'right', width: 120 }, | ||
{ | ||
title: '活动名称', dataIndex: 'name', width: 140, render: val => { | ||
return <CTable.TextTpl value={val} /> | ||
} | ||
}, | ||
{ | ||
title: '创建时间', dataIndex: 'createTime', width: 140, render: val => { | ||
return <CTable.TimeTpl value={val} /> | ||
} | ||
}, | ||
{ | ||
title: '人数', | ||
dataIndex: 'num', | ||
align: 'right', | ||
width: 120, | ||
render: val => <CTable.NumberTpl value={val} precision={0} /> | ||
}, | ||
{ title: '创建人', dataIndex: 'creator', width: 130 } | ||
]; | ||
|
||
export default function CTableDemo() { | ||
return ( | ||
<CTable | ||
style={{ height: 400 }} | ||
columnData={columns} | ||
ajaxData={{ totals: data.length, data }} | ||
/> | ||
); | ||
return ( | ||
<CTable | ||
style={{ height: 400 }} | ||
columnData={columns} | ||
ajaxData={{ totals: data.length, data }} | ||
/> | ||
); | ||
} | ||
``` |
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
Oops, something went wrong.