Commit 1466132c by zhangleyuan

feat:修改培训计划

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