xaboy / form-create

:fire::fire::fire: 强大的动态表单生成器,通过数据驱动表单渲染,适配移动端,支持可视化设计。提高开发者对表单的开发效率。目前在OA系统、ERP系统、电商系统、流程管理等系统中已稳定应用。
https://www.form-create.com/
MIT License
5.87k stars 944 forks source link

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

Open eloves opened 1 month ago

eloves commented 1 month ago

版本号 (version)

@form-create/ant-design-vue@2.5.37

UI 框架的版本 (UI version)

ant-design-vue@1.7.2

问题描述 (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

xaboy commented 1 month ago

感谢反馈, 下个版本修复