From b55c1b942d35f9442803c25e051d88417e8c5e2c Mon Sep 17 00:00:00 2001 From: xingyu Date: Sat, 12 Aug 2023 17:31:33 +0800 Subject: [PATCH 1/4] perf: vben 2.0 codegen --- .../codegen/vue3_vben/views/data.ts.vm | 72 ++++++++--------- .../codegen/vue3_vben/views/form.vue.vm | 14 ++-- .../codegen/vue3_vben/views/index.vue.vm | 80 +++++++++---------- 3 files changed, 83 insertions(+), 83 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm index 6f0c01d807..1cd976b3ce 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm @@ -15,7 +15,7 @@ export const columns: BasicColumn[] = [ width: 180, customRender: ({ text }) => { return useRender.renderDate(text) - } + }, }, #elseif("" != $column.dictType)## 数据字典 { @@ -24,7 +24,7 @@ export const columns: BasicColumn[] = [ width: 180, customRender: ({ text }) => { return useRender.renderDict(text, DICT_TYPE.$dictType.toUpperCase()) - } + }, }, #else { @@ -53,9 +53,9 @@ export const searchFormSchema: FormSchema[] = [ component: 'Select', componentProps: { #if ("" != $dictType)## 设置了 dictType 数据字典的情况 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()) + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()), #else## 未设置 dictType 数据字典的情况 - options: [] + options: [], #end }, #elseif($column.htmlType == "datetime") @@ -88,52 +88,52 @@ export const createFormSchema: FormSchema[] = [ required: true, #end #if ($column.htmlType == "input") - component: 'Input' + component: 'Input', #elseif($column.htmlType == "imageUpload")## 图片上传 component: 'FileUpload', componentProps: { fileType: 'file', - maxCount: 1 - } + maxCount: 1, + }, #elseif($column.htmlType == "fileUpload")## 文件上传 component: 'FileUpload', componentProps: { fileType: 'image', - maxCount: 1 - } + maxCount: 1, + }, #elseif($column.htmlType == "editor")## 文本编辑器 - component: 'Editor' + component: 'Editor', #elseif($column.htmlType == "select")## 下拉框 component: 'Select', componentProps: { #if ("" != $dictType)## 有数据字典 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), #else##没数据字典 - options:[] + options:[], #end - } + }, #elseif($column.htmlType == "checkbox")## 多选框 component: 'Checkbox', componentProps: { #if ("" != $dictType)## 有数据字典 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), #else##没数据字典 - options:[] + options:[], #end - } + }, #elseif($column.htmlType == "radio")## 单选框 component: 'RadioButtonGroup', componentProps: { #if ("" != $dictType)## 有数据字典 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), #else##没数据字典 - options:[] + options:[], #end - } + }, #elseif($column.htmlType == "datetime")## 时间框 - component: 'DatePicker' + component: 'DatePicker', #elseif($column.htmlType == "textarea")## 文本域 - component: 'InputTextArea' + component: 'InputTextArea', #end }, #end @@ -162,44 +162,44 @@ export const updateFormSchema: FormSchema[] = [ required: true, #end #if ($column.htmlType == "input") - component: 'Input' + component: 'Input', #elseif($column.htmlType == "imageUpload")## 图片上传 - component: 'Upload' + component: 'Upload', #elseif($column.htmlType == "fileUpload")## 文件上传 - component: 'Upload' + component: 'Upload', #elseif($column.htmlType == "editor")## 文本编辑器 - component: 'Editor' + component: 'Editor', #elseif($column.htmlType == "select")## 下拉框 component: 'Select', componentProps: { #if ("" != $dictType)## 有数据字典 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), #else##没数据字典 - options:[] + options:[], #end - } + }, #elseif($column.htmlType == "checkbox")## 多选框 component: 'Checkbox', componentProps: { #if ("" != $dictType)## 有数据字典 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), #else##没数据字典 - options:[] + options:[], #end - } + }, #elseif($column.htmlType == "radio")## 单选框 component: 'RadioButtonGroup', componentProps: { #if ("" != $dictType)## 有数据字典 - options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number'), #else##没数据字典 - options:[] + options:[], #end - } + }, #elseif($column.htmlType == "datetime")## 时间框 - component: 'DatePicker' + component: 'DatePicker', #elseif($column.htmlType == "textarea")## 文本域 - component: 'InputTextArea' + component: 'InputTextArea', #end }, #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/form.vue.vm index f0157e2f47..65d9d3d006 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/form.vue.vm @@ -1,15 +1,10 @@ - + \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm index e5faddd299..bdd9afe7b9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm @@ -1,47 +1,12 @@ - + \ No newline at end of file From 1a999cbb75e91f4ef11262df9fe4f5c7b341b94e Mon Sep 17 00:00:00 2001 From: xingyu Date: Sat, 12 Aug 2023 18:09:19 +0800 Subject: [PATCH 2/4] chore: up mybatis-plus 3.5.3.2 --- yudao-dependencies/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0d43f9a11f..df26ad18e0 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -23,8 +23,8 @@ 2.5 1.2.18 - 3.5.3.1 - 3.5.3.1 + 3.5.3.2 + 3.5.3.2 3.6.1 1.4.5 3.18.0 From baa2e69cdf16b70c7cd4c0fab5fda0d574e7c84c Mon Sep 17 00:00:00 2001 From: xingyu Date: Sat, 12 Aug 2023 18:31:16 +0800 Subject: [PATCH 3/4] fix: vben codegen --- .../src/main/resources/codegen/vue3_vben/views/data.ts.vm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm index 1cd976b3ce..7f56964ed5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm @@ -30,7 +30,7 @@ export const columns: BasicColumn[] = [ { title: '${comment}', dataIndex: '${javaField}', - width: 160 + width: 160, }, #end #end @@ -61,7 +61,7 @@ export const searchFormSchema: FormSchema[] = [ #elseif($column.htmlType == "datetime") component: 'RangePicker', #end - colProps: { span: 8 } + colProps: { span: 8 }, }, #end #end @@ -72,7 +72,7 @@ export const createFormSchema: FormSchema[] = [ label: '编号', field: 'id', show: false, - component: 'Input' + component: 'Input', }, #foreach($column in $columns) #if ($column.createOperation) @@ -146,7 +146,7 @@ export const updateFormSchema: FormSchema[] = [ label: '编号', field: 'id', show: false, - component: 'Input' + component: 'Input', }, #foreach($column in $columns) #if ($column.updateOperation) From 282c15c7c4a42ea4c034ad66912d267268cda421 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 23 Aug 2023 11:37:09 +0800 Subject: [PATCH 4/4] fix: vben codegen antdv 4.0 --- .../src/main/resources/codegen/vue3_vben/views/index.vue.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm index bdd9afe7b9..d9538a0643 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm @@ -73,7 +73,7 @@ async function handleDelete(record: Recordable) { { icon: IconEnum.EDIT, label: t('action.edit'), auth: '${permissionPrefix}:update', onClick: handleEdit.bind(null, record) }, { icon: IconEnum.DELETE, - color: 'error', + danger: true, label: t('action.delete'), auth: '${permissionPrefix}:delete', popConfirm: {