From bde8637e8c274f64b7baa84904a888cdd99b1474 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 7 Jun 2025 10:42:55 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20vben5-general=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../general/views/index.vue.vm | 22 +++++++++---------- .../general/views/modules/list_sub_erp.vue.vm | 16 +++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/index.vue.vm b/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/index.vue.vm index cf7dc86826..d998770639 100644 --- a/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/index.vue.vm +++ b/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/general/views/index.vue.vm @@ -123,24 +123,24 @@ const [FormModal, formModalApi] = useVbenModal({ }); /** 创建${table.classComment} */ -function onCreate() { +function handleCreate() { formModalApi.setData({}).open(); } /** 编辑${table.classComment} */ -function onEdit(row: ${simpleClassName}Api.${simpleClassName}) { +function handleEdit(row: ${simpleClassName}Api.${simpleClassName}) { formModalApi.setData(row).open(); } #if (${table.templateType} == 2)## 树表特有:新增下级 /** 新增下级${table.classComment} */ -function onAppend(row: ${simpleClassName}Api.${simpleClassName}) { +function handleAppend(row: ${simpleClassName}Api.${simpleClassName}) { formModalApi.setData({ ${treeParentColumn.javaField}: row.id }).open(); } #end /** 删除${table.classComment} */ -async function onDelete(row: ${simpleClassName}Api.${simpleClassName}) { +async function handleDelete(row: ${simpleClassName}Api.${simpleClassName}) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.id]), duration: 0, @@ -157,10 +157,10 @@ async function onDelete(row: ${simpleClassName}Api.${simpleClassName}) { hideLoading(); } } -// TODO @puhui999: 改成和 schema 模式一样 + #if ($table.templateType != 2 && $deleteBatchEnable) /** 批量删除${table.classComment} */ -async function onDeleteBatch() { +async function handleDeleteBatch() { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting'), duration: 0, @@ -315,7 +315,7 @@ onMounted(() => { class="ml-2" :icon="h(Plus)" type="primary" - @click="onCreate" + @click="handleCreate" v-access:code="['${permissionPrefix}:create']" > {{ $t('ui.actionTitle.create', ['${table.classComment}']) }} @@ -337,7 +337,7 @@ onMounted(() => { danger class="ml-2" :disabled="isEmpty(checkedIds)" - @click="onDeleteBatch" + @click="handleDeleteBatch" v-access:code="['${table.moduleName}:${simpleClassName_strikeCase}:delete']" > 批量删除 @@ -426,7 +426,7 @@ onMounted(() => {