diff --git a/apps/web-antd/src/views/system/mail/template/data.ts b/apps/web-antd/src/views/system/mail/template/data.ts index 777828bb1..547a58c31 100644 --- a/apps/web-antd/src/views/system/mail/template/data.ts +++ b/apps/web-antd/src/views/system/mail/template/data.ts @@ -1,7 +1,6 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemMailTemplateApi } from '#/api/system/mail/template'; -import type { ComputedRef } from 'vue'; import { z } from '#/adapter/form'; import { getSimpleMailAccountList } from '#/api/system/mail/account'; @@ -192,9 +191,9 @@ export function useGridFormSchema(): VbenFormSchema[] { } /** 列表的字段 */ +const accountList = await getSimpleMailAccountList(); export function useGridColumns( - onActionClick: OnActionClickFn, - getAccountName: ComputedRef<(cellValue: number) => string>, + onActionClick: OnActionClickFn ): VxeTableGridOptions['columns'] { return [ { @@ -221,7 +220,7 @@ export function useGridColumns( field: 'accountId', title: '邮箱账号', minWidth: 120, - formatter: ({ cellValue }) => getAccountName.value(cellValue), + formatter: ({ cellValue }) => accountList.find((account) => account.id === cellValue)?.mail || '-', }, { field: 'nickname', diff --git a/apps/web-antd/src/views/system/mail/template/index.vue b/apps/web-antd/src/views/system/mail/template/index.vue index ee6b7ea47..b223b5b25 100644 --- a/apps/web-antd/src/views/system/mail/template/index.vue +++ b/apps/web-antd/src/views/system/mail/template/index.vue @@ -1,20 +1,17 @@