Commit 32bdc20a4b498ea7c0c5ac746647ef4d74d62807

Authored by puhui999
1 parent 11402e14

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

yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm
@@ -75,18 +75,10 @@ export function useFormSchema(): VbenFormSchema[] { @@ -75,18 +75,10 @@ export function useFormSchema(): VbenFormSchema[] {
75 componentProps: { 75 componentProps: {
76 placeholder: '请输入${comment}', 76 placeholder: '请输入${comment}',
77 }, 77 },
78 - #elseif($column.htmlType == "imageUpload")## 图片上传 TODO @puhui999:目前分成了图片和文件上传,可以不用 fileType 之类哈,可以用下;  
79 - component: 'FileUpload',  
80 - componentProps: {  
81 - fileType: 'image',  
82 - maxCount: 1,  
83 - }, 78 + #elseif($column.htmlType == "imageUpload")## 图片上传
  79 + component: 'ImageUpload',
84 #elseif($column.htmlType == "fileUpload")## 文件上传 80 #elseif($column.htmlType == "fileUpload")## 文件上传
85 component: 'FileUpload', 81 component: 'FileUpload',
86 - componentProps: {  
87 - fileType: 'file',  
88 - maxCount: 1,  
89 - },  
90 #elseif($column.htmlType == "editor")## 文本编辑器 82 #elseif($column.htmlType == "editor")## 文本编辑器
91 component: 'RichTextarea', 83 component: 'RichTextarea',
92 #elseif($column.htmlType == "select")## 下拉框 84 #elseif($column.htmlType == "select")## 下拉框
@@ -320,17 +312,9 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] { @@ -320,17 +312,9 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] {
320 placeholder: '请输入${comment}', 312 placeholder: '请输入${comment}',
321 }, 313 },
322 #elseif($column.htmlType == "imageUpload")## 图片上传 314 #elseif($column.htmlType == "imageUpload")## 图片上传
323 - component: 'FileUpload',  
324 - componentProps: {  
325 - fileType: 'image',  
326 - maxCount: 1,  
327 - }, 315 + component: 'ImageUpload',
328 #elseif($column.htmlType == "fileUpload")## 文件上传 316 #elseif($column.htmlType == "fileUpload")## 文件上传
329 component: 'FileUpload', 317 component: 'FileUpload',
330 - componentProps: {  
331 - fileType: 'file',  
332 - maxCount: 1,  
333 - },  
334 #elseif($column.htmlType == "editor")## 文本编辑器 318 #elseif($column.htmlType == "editor")## 文本编辑器
335 component: 'RichTextarea', 319 component: 'RichTextarea',
336 #elseif($column.htmlType == "select")## 下拉框 320 #elseif($column.htmlType == "select")## 下拉框
@@ -603,17 +587,9 @@ export function use${subSimpleClassName}GridColumns( @@ -603,17 +587,9 @@ export function use${subSimpleClassName}GridColumns(
603 placeholder: '请输入${comment}', 587 placeholder: '请输入${comment}',
604 }, 588 },
605 #elseif($column.htmlType == "imageUpload")## 图片上传 589 #elseif($column.htmlType == "imageUpload")## 图片上传
606 - component: 'FileUpload',  
607 - componentProps: {  
608 - fileType: 'image',  
609 - maxCount: 1,  
610 - }, 590 + component: 'ImageUpload',
611 #elseif($column.htmlType == "fileUpload")## 文件上传 591 #elseif($column.htmlType == "fileUpload")## 文件上传
612 component: 'FileUpload', 592 component: 'FileUpload',
613 - componentProps: {  
614 - fileType: 'file',  
615 - maxCount: 1,  
616 - },  
617 #elseif($column.htmlType == "editor")## 文本编辑器 593 #elseif($column.htmlType == "editor")## 文本编辑器
618 component: 'RichTextarea', 594 component: 'RichTextarea',
619 #elseif($column.htmlType == "select")## 下拉框 595 #elseif($column.htmlType == "select")## 下拉框