form-create icon indicating copy to clipboard operation
form-create copied to clipboard

2.5版本中的antdv中input组件使用updateRule改变type字段,组件却无法切换

Open eloves opened this issue 1 year ago • 1 comments

版本号 (version)

@form-create/[email protected]

UI 框架的版本 (UI version)

[email protected]

问题描述 (Issue)

2.5版本中的antdv中input组件使用updateRule改变type字段,组件却无法切换。其它组件可以正常切换,对应的其它框架input也没有这个问题。

复现步骤/生成规则 (Duplicate steps/generate rules)

规则:

rule:[
      {
          type:'input',
          field:'goods',
          title:'商品名称',
          value:'form-create'
      }
]

api调用:

updateRules({
  goods: {
    type: 'custom-com',
   children: ['**']
  }
})

期望的结果 (Desired outcome)

希望可以正常切换type

建议 (Advice)

优化antdv中input的render写法,判断ctx.type类型,再来判断使用ctx.$render.vNode.make或者ctx.$render.defaultRender

eloves avatar Jun 25 '24 02:06 eloves

感谢反馈, 下个版本修复

xaboy avatar Jun 25 '24 06:06 xaboy

已优化

xaboy avatar Sep 08 '24 12:09 xaboy