From e8d83d4718380a4e7b9ecde399e443e50a297533 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 Mar 2023 11:40:55 +0800 Subject: [PATCH] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E5=AE=8C=E5=96=84=E5=AE=8C=20=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=A8=A1=E7=89=88=20=E7=9A=84=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/mail/account/account.data.ts | 16 +-- src/views/system/mail/template/index.vue | 18 +++ src/views/system/mail/template/send.vue | 115 ++++++++++++++++++ .../system/mail/template/template.data.ts | 10 -- 4 files changed, 136 insertions(+), 23 deletions(-) create mode 100644 src/views/system/mail/template/send.vue diff --git a/src/views/system/mail/account/account.data.ts b/src/views/system/mail/account/account.data.ts index 532a6a08..f01c39f2 100644 --- a/src/views/system/mail/account/account.data.ts +++ b/src/views/system/mail/account/account.data.ts @@ -1,8 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { DictTag } from '@/components/DictTag' -import { TableColumn } from '@/types/table' import { dateFormatter } from '@/utils/formatTime' -import { getBoolDictOptions } from '@/utils/dict' const { t } = useI18n() // 国际化 @@ -55,17 +52,10 @@ const crudSchemas = reactive([ { label: '是否开启 SSL', field: 'sslEnable', - formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { - return h(DictTag, { - type: DICT_TYPE.INFRA_BOOLEAN_STRING, - value: cellValue - }) - }, + dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, + dictClass: 'boolean', form: { - component: 'Radio', - componentProps: { - options: getBoolDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) - } + component: 'Radio' } }, { diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue index ef8d800d..b9a5040b 100644 --- a/src/views/system/mail/template/index.vue +++ b/src/views/system/mail/template/index.vue @@ -28,6 +28,14 @@ v-model:currentPage="tableObject.currentPage" > diff --git a/src/views/system/mail/template/template.data.ts b/src/views/system/mail/template/template.data.ts index 129fa4e5..bfdd5cad 100644 --- a/src/views/system/mail/template/template.data.ts +++ b/src/views/system/mail/template/template.data.ts @@ -1,7 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import { TableColumn } from '@/types/table' -import { DictTag } from '@/components/DictTag' import * as MailAccountApi from '@/api/system/mail/account' const accounts = await MailAccountApi.getSimpleMailAccountList() @@ -38,9 +37,6 @@ const crudSchemas = reactive([ field: 'content', form: { component: 'Editor', - colProps: { - span: 24 - }, componentProps: { valueHtml: '', height: 200 @@ -84,12 +80,6 @@ const crudSchemas = reactive([ label: '开启状态', field: 'status', isSearch: true, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return h(DictTag, { - type: DICT_TYPE.COMMON_STATUS, - value: cellValue - }) - }, dictType: DICT_TYPE.COMMON_STATUS, dictClass: 'number' },