From 39e7d782a759367d609ee73946fd79cfdd8ab4c7 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 21 May 2025 14:27:00 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20vben5=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=20=E4=BD=BF=E7=94=A8=20table=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vue3_vben5_antd/schema/views/data.ts.vm | 9 +- .../vue3_vben5_antd/schema/views/index.vue.vm | 160 ++++++++++-------- 2 files changed, 91 insertions(+), 78 deletions(-) diff --git a/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm b/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm index 46c19d96d5..b6d2feab10 100644 --- a/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm +++ b/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm @@ -1,5 +1,5 @@ import type { VbenFormSchema } from '#/adapter/form'; -import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; import { z } from '#/adapter/form'; @@ -12,9 +12,6 @@ import { import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}'; import { handleTree } from '@vben/utils'; #end -import { useAccess } from '@vben/access'; - -const { hasAccessByCodes } = useAccess(); /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { @@ -189,9 +186,7 @@ export function useGridFormSchema(): VbenFormSchema[] { } /** 列表的字段 */ -export function useGridColumns( - onActionClick?: OnActionClickFn<${simpleClassName}Api.${simpleClassName}>, -): VxeTableGridOptions<${simpleClassName}Api.${simpleClassName}>['columns'] { +export function useGridColumns(): VxeTableGridOptions<${simpleClassName}Api.${simpleClassName}>['columns'] { return [ #if ($table.templateType != 2 && $deleteBatchEnable) { type: 'checkbox', width: 40 }, diff --git a/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm b/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm index ffbd052c57..7edddbc071 100644 --- a/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm +++ b/yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm @@ -1,10 +1,9 @@