|
@@ -184,7 +184,7 @@ const Index = props => {
|
|
|
|
|
|
const tableSetting = {
|
|
|
getRefresh: refresh => {
|
|
|
- refreshPage = refresh;
|
|
|
+ refreshPage = refresh
|
|
|
},
|
|
|
rowKey: 'id',
|
|
|
defaultExpandAllRows: true,
|
|
@@ -194,23 +194,24 @@ const Index = props => {
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: 'ID',
|
|
|
- dataIndex: 'id',
|
|
|
+ width: 70,
|
|
|
+ dataIndex: 'id'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '名称',
|
|
|
- dataIndex: 'name',
|
|
|
+ dataIndex: 'name'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '描述',
|
|
|
- dataIndex: 'description',
|
|
|
+ dataIndex: 'description'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '场景',
|
|
|
dataIndex: 'scene',
|
|
|
- textLength: 20,
|
|
|
+ textLength: 20
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
@@ -218,11 +219,11 @@ const Index = props => {
|
|
|
dataIndex: 'state',
|
|
|
render: text => {
|
|
|
if (text === 1) {
|
|
|
- return <Tag color="green">启用</Tag>;
|
|
|
+ return <Tag color="green">启用</Tag>
|
|
|
} else {
|
|
|
- return <Tag color="red">禁用</Tag>;
|
|
|
+ return <Tag color="red">禁用</Tag>
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
@@ -230,25 +231,25 @@ const Index = props => {
|
|
|
dataIndex: 'is_show',
|
|
|
render: text => {
|
|
|
if (text === 1) {
|
|
|
- return <Tag color="green">显示</Tag>;
|
|
|
+ return <Tag color="green">显示</Tag>
|
|
|
} else {
|
|
|
- return <Tag color="red">隐藏</Tag>;
|
|
|
+ return <Tag color="red">隐藏</Tag>
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '创建时间',
|
|
|
- dataIndex: 'created_at',
|
|
|
+ dataIndex: 'created_at'
|
|
|
},
|
|
|
{
|
|
|
align: 'center',
|
|
|
title: '操作',
|
|
|
dataIndex: 'actions',
|
|
|
- render: (text, record) => renderOption(record),
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
+ render: (text, record) => renderOption(record)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
return (
|
|
|
<>
|
|
|
{visible && <Edit setVisible={setVisible} params={params} identify={identify} refreshPage={refreshPage}/> }
|