refs
用户 LanceJiang <lancejiangwei@qq.com>
星期四, 八月 3, 2023 11:12 +0800
提交者 GitHub <noreply@github.com>
星期四, 八月 3, 2023 11:12 +0800
提交a065de4fbc8745323105ff5ba9032108dab91d24
目录 3e83fb39ce91f2168c836b26680ac21badf3f320 目录 | zip | gz
parent fa5ecb090fb4ecde4b5f6b14f2a5fdb97f67e1e9 查看 | 对比
feat: Form 自定义组件渲染 新增 opts: {disabled} 用于自定义渲染判断 示例: /comp/form/customerForm页面 (#2944)

* feat: Form 自定义组件渲染 示例: /comp/form/customerForm页面
1. 针对自定义渲染功能 FormSchema 中
render, renderColContent, renderComponentContent 新增 opts:{disabled} 扩展 帮助自定义渲染时做 条件判断、展示同步
渲染: ((renderCallbackParams) => any) ===> ((renderCallbackParams, opts) => any)
2. slot, colSlot 分别是 render, renderColContent 插槽,为方便插槽使用
slotFn 进行解构 #test={scope} scope==={...data, ...opts}

* feat: Form 自定义组件渲染 示例: /comp/form/customerForm页面

1. 针对自定义渲染功能 FormSchema 新增 [fields] 和 [defaultValueObj] 帮助
render, renderColContent 自定义渲染时 存在多个 表单字段操作(复合field 场景)
6个文件已修改
255 ■■■■ 已修改文件
src/components/Form/src/components/FormItem.vue 13 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/components/Form/src/hooks/useFormEvents.ts 28 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/components/Form/src/hooks/useFormValues.ts 11 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/components/Form/src/types/form.ts 25 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/utils/helper/tsxHelper.tsx 6 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/views/demo/form/CustomerForm.vue 172 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史