LANIF-UI / dva-boot-admin

:cake: react admin dashboard ui LANIF-ADMIN --- react 16 + react-router 4 + dva 2 + antd 4 后台管理 脚手架
https://lanif-ui.github.io/dva-boot-admin
MIT License
1.67k stars 460 forks source link

SearchBar和ModalForm的columns单独写各自的array,会报ID重名 #65

Closed niaonile closed 5 years ago

niaonile commented 5 years ago

[DOM] Found 3 elements with non-unique id #deptName。 提交表单和搜索项不一样

weiq commented 5 years ago

上代码片段看下,暂时没遇到过这种问题

niaonile commented 5 years ago

`export default (self, employees) => [ { title: '数据源名称', name: 'deptName', tableItem: {}, searchItem: { group: 'abc' }, formItem: { rules: [ { required: true, message: '请输入数据源名称', } ], } }, { title: '数据源类型', name: 'distributionNetwork', dict: [{ code: '0', codeName: 'a' }, { code: '1', codeName: 'b' }], formItem: { type: 'select', rules: [ { required: true, message: '请选择数据源类型', } ], }, }, { title: '驱动类', name: 'qd', dict: [{ code: '0', codeName: '驱动a' }, { code: '1', codeName: '驱动b' }], formItem: { type: 'select', rules: [ { required: true, message: '请输入数据库用户名', } ], } }, { title: '链接串', name: 'lj', formItem: { // disabled: true, rules: [ { required: true, message: '请输入链接串', } ], } }, { title: '数据库用户名', name: 'sqlName', formItem: { rules: [ { required: true, message: '请输入数据库用户名', } ], } }, { title: '数据库密码', name: 'sqlPwd', formItem: { type: 'password' } }, { title: '操作', tableItem: { width: 180, render: (text, record) => (

) } } ];` columns是动过的,其余文件是按crud复制的
weiq commented 5 years ago

看这个没问题,每个id只有一个,不会重复啊