2.0版本,关于crud组件的组合表头无法获取form的bug
fsg-herbie opened this issue · 2 comments
fsg-herbie commented
在使用组合表头的时候,设置columns搜索和表格都没问题,但是from无法获取到表单字段
配置如下
//此处省略...
const columns = reactive([
{
title: "名称",
dataIndex: "name",
formType: "input",
search: true
},
{
title:"状态组",align: 'content',addDisplay: false, editDisplay: false,
children:[
{
title: "状态1",
dataIndex: "status_1",
formType: "input",
search: true,
addDisplay: false,
editDisplay: false,width:100,
},
{
title: "状态2",
dataIndex: `"status_2",`
formType: "input",
addDisplay: false,
editDisplay: false,width:100,
},
]
},
{
dataIndex:'remark',title:"备注",
},
])
//此处省略...
我已进行了如下修复
src/components/ma-crud/components/form.vue
第194行,把原来的代码替换成
//此处省略...
columns.value.map(async item => {
if (item.children && item.children.length > 0){
await item.children.map(async (childItem) => {
await columnItemHandle(childItem)
})
}else {
await columnItemHandle(item)
}
})
//此处省略...
kanyxmo commented
提个pr吧
fsg-herbie commented
提了哦