Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0版本,关于crud组件的组合表头无法获取form的bug #128

Open
fsg-herbie opened this issue Mar 11, 2024 · 2 comments
Open

Comments

@fsg-herbie
Copy link
Contributor

在使用组合表头的时候,设置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
Copy link
Member

kanyxmo commented Mar 12, 2024

提个pr吧

@fsg-herbie
Copy link
Contributor Author

提了哦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants