Commit 1466132c by zhangleyuan

feat:修改培训计划

parent 589d4e51
......@@ -106,7 +106,6 @@ function PlanList(props) {
key: 'operate',
dataIndex: 'operate',
width: '25%',
fixed: 'right',
render: (val, record) => {
return (
<div className="operate">
......
......@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-02-23 16:23:07
* @LastEditTime: 2021-02-23 18:10:58
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -16,48 +16,45 @@ import { withRouter } from 'react-router-dom';
const DragHandle = sortableHandle(() => (
<MenuOutlined style={{ cursor: 'pointer', color: '#999' }} />
));
const columns = [
{
title: 'Sort',
dataIndex: 'sort',
width: 30,
className: 'drag-visible',
render: () => <DragHandle />,
},
{
title: 'Name',
dataIndex: 'name',
className: 'drag-visible',
},
{
title: 'Age',
dataIndex: 'age',
},
{
title: 'Address',
dataIndex: 'address',
},
title: '操作',
key: 'operate',
dataIndex: 'operate',
width: '25%',
render: (val, record) => {
return (
<div className="operate">
<DragHandle />
</div>
)
}
}
];
const data = [
{
key: '1',
name: 'John Brown',
name: '培训计划名称1',
age: 32,
address: 'New York No. 1 Lake Park',
index: 0,
},
{
key: '2',
name: 'Jim Green',
name: '培训计划名称2',
age: 42,
address: 'London No. 1 Lake Park',
index: 1,
},
{
key: '3',
name: 'Joe Black',
name: '培训计划名称3',
age: 32,
address: 'Sidney No. 1 Lake Park',
index: 2,
......@@ -106,12 +103,15 @@ class TrainingTask extends React.Component {
dataSource={dataSource}
columns={columns}
rowKey="index"
components={{
body: {
wrapper: this.DraggableContainer,
row: this.DraggableBodyRow,
},
expandable={{
expandedRowRender: record => <p style={{ margin: 0 }}>我是展开部分的内容</p>,
}}
// components={{
// body: {
// wrapper: this.DraggableContainer,
// row: this.DraggableBodyRow,
// },
// }}
/>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment