vue-vben-admin icon indicating copy to clipboard operation
vue-vben-admin copied to clipboard

调用 updateSchema 更新含有 componentProps: () => {} 的表单项出现的问题

Open i7eo opened this issue 2 years ago • 4 comments

场景就是手动调用 updateSchema 来更新一个表单中的 select 表单项 schema,这个表单项的 componentProps 是函数(函数中有一些业务逻辑),此时动态调用 updateSchema 来更新 componentProps 函数中的 options 数组。如下:

updateSchema([
  {
    field: "selectA",
    componentProps: {
      options: [
        // ...
      ]
    }
  }
])

此时原本的 componentProps 函数会被新的 componentProps 对象覆盖。 不知道有什么快速的办法解决这个问题,还是我的用法不对😥

i7eo avatar Mar 14 '22 12:03 i7eo

我也出现了这样的问题,请问有什么解决方案么?

Aljs66 avatar Oct 10 '23 03:10 Aljs66

我也出现了这样的问题,请问有什么解决方案么?

改源码😥

i7eo avatar Oct 12 '23 05:10 i7eo

问题解决了么

2027580893 avatar Feb 07 '24 13:02 2027580893

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

anncwb avatar Apr 26 '24 01:04 anncwb