【代码优化】INFRA:代码生成 vben5 schema data.ts 模版优化

This commit is contained in:
puhui999 2025-04-22 16:12:12 +08:00
parent 11402e1412
commit 32bdc20a4b

View File

@ -75,18 +75,10 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
placeholder: '请输入${comment}',
},
#elseif($column.htmlType == "imageUpload")## 图片上传 TODO @puhui999目前分成了图片和文件上传可以不用 fileType 之类哈,可以用下;
component: 'FileUpload',
componentProps: {
fileType: 'image',
maxCount: 1,
},
#elseif($column.htmlType == "imageUpload")## 图片上传
component: 'ImageUpload',
#elseif($column.htmlType == "fileUpload")## 文件上传
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1,
},
#elseif($column.htmlType == "editor")## 文本编辑器
component: 'RichTextarea',
#elseif($column.htmlType == "select")## 下拉框
@ -320,17 +312,9 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] {
placeholder: '请输入${comment}',
},
#elseif($column.htmlType == "imageUpload")## 图片上传
component: 'FileUpload',
componentProps: {
fileType: 'image',
maxCount: 1,
},
component: 'ImageUpload',
#elseif($column.htmlType == "fileUpload")## 文件上传
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1,
},
#elseif($column.htmlType == "editor")## 文本编辑器
component: 'RichTextarea',
#elseif($column.htmlType == "select")## 下拉框
@ -603,17 +587,9 @@ export function use${subSimpleClassName}GridColumns(
placeholder: '请输入${comment}',
},
#elseif($column.htmlType == "imageUpload")## 图片上传
component: 'FileUpload',
componentProps: {
fileType: 'image',
maxCount: 1,
},
component: 'ImageUpload',
#elseif($column.htmlType == "fileUpload")## 文件上传
component: 'FileUpload',
componentProps: {
fileType: 'file',
maxCount: 1,
},
#elseif($column.htmlType == "editor")## 文本编辑器
component: 'RichTextarea',
#elseif($column.htmlType == "select")## 下拉框