Commit 32bdc20a4b498ea7c0c5ac746647ef4d74d62807
1 parent
11402e14
【代码优化】INFRA:代码生成 vben5 schema data.ts 模版优化
Showing
1 changed file
with
4 additions
and
28 deletions
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 | 75 | componentProps: { |
| 76 | 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 | 80 | #elseif($column.htmlType == "fileUpload")## 文件上传 |
| 85 | 81 | component: 'FileUpload', |
| 86 | - componentProps: { | |
| 87 | - fileType: 'file', | |
| 88 | - maxCount: 1, | |
| 89 | - }, | |
| 90 | 82 | #elseif($column.htmlType == "editor")## 文本编辑器 |
| 91 | 83 | component: 'RichTextarea', |
| 92 | 84 | #elseif($column.htmlType == "select")## 下拉框 |
| ... | ... | @@ -320,17 +312,9 @@ export function use${subSimpleClassName}FormSchema(): VbenFormSchema[] { |
| 320 | 312 | placeholder: '请输入${comment}', |
| 321 | 313 | }, |
| 322 | 314 | #elseif($column.htmlType == "imageUpload")## 图片上传 |
| 323 | - component: 'FileUpload', | |
| 324 | - componentProps: { | |
| 325 | - fileType: 'image', | |
| 326 | - maxCount: 1, | |
| 327 | - }, | |
| 315 | + component: 'ImageUpload', | |
| 328 | 316 | #elseif($column.htmlType == "fileUpload")## 文件上传 |
| 329 | 317 | component: 'FileUpload', |
| 330 | - componentProps: { | |
| 331 | - fileType: 'file', | |
| 332 | - maxCount: 1, | |
| 333 | - }, | |
| 334 | 318 | #elseif($column.htmlType == "editor")## 文本编辑器 |
| 335 | 319 | component: 'RichTextarea', |
| 336 | 320 | #elseif($column.htmlType == "select")## 下拉框 |
| ... | ... | @@ -603,17 +587,9 @@ export function use${subSimpleClassName}GridColumns( |
| 603 | 587 | placeholder: '请输入${comment}', |
| 604 | 588 | }, |
| 605 | 589 | #elseif($column.htmlType == "imageUpload")## 图片上传 |
| 606 | - component: 'FileUpload', | |
| 607 | - componentProps: { | |
| 608 | - fileType: 'image', | |
| 609 | - maxCount: 1, | |
| 610 | - }, | |
| 590 | + component: 'ImageUpload', | |
| 611 | 591 | #elseif($column.htmlType == "fileUpload")## 文件上传 |
| 612 | 592 | component: 'FileUpload', |
| 613 | - componentProps: { | |
| 614 | - fileType: 'file', | |
| 615 | - maxCount: 1, | |
| 616 | - }, | |
| 617 | 593 | #elseif($column.htmlType == "editor")## 文本编辑器 |
| 618 | 594 | component: 'RichTextarea', |
| 619 | 595 | #elseif($column.htmlType == "select")## 下拉框 | ... | ... |