Commit c8627e28 authored by shaoan123's avatar shaoan123

解决表字段配置没有key的问题

parent 6d52b027
Pipeline #31321 passed with stages
in 51 minutes 11 seconds
......@@ -94,7 +94,8 @@ const TableManager = () => {
setVisible(true);
}
//字段配置
const fieldsConfig = (record) => {
const fieldsConfig = (record,e) => {
e.stopPropagation()
setFormObj(record);
history.push(`/platformCenter/bsmanger/filedConfig/${record.tableName}`)
// setType('config');
......@@ -174,24 +175,24 @@ const TableManager = () => {
}
}
}
for (let key in tempObj) {
for (let keys in tempObj) {
let arr = []
tempObj[key].map(item => {
tempObj[key] = arr;
tempObj[keys].map((item,index) => {
tempObj[keys] = arr;
item.key = index
arr.push(item)
})
}
return tempObj
}
const expandedRowRender = (item) => {
console.log('item',item);
const columns1 = [
{
title: '名称',
dataIndex: 'tableName',
key: 'tableName',
width: 300,
render: text => <a>{text}</a>,
render: (text,record) => <a onClick={e=>fieldsConfig(record,e)}>{text}</a>,
},
{
......@@ -256,7 +257,7 @@ const TableManager = () => {
</Tooltip>
<Tooltip title="字段配置">
<FontColorsOutlined
onClick={() => fieldsConfig(record)}
onClick={e => fieldsConfig(record,e)}
style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Tooltip>
......
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