Vue3 重构:基本完善完 邮件模版 的重构

This commit is contained in:
YunaiV
2023-03-18 11:40:55 +08:00
parent 7d22328d69
commit e8d83d4718
4 changed files with 136 additions and 23 deletions

View File

@ -28,6 +28,14 @@
v-model:currentPage="tableObject.currentPage"
>
<template #action="{ row }">
<el-button
link
type="primary"
@click="openSend(row.id)"
v-hasPermi="['system:mail-template:send-mail']"
>
测试
</el-button>
<el-button
link
type="primary"
@ -50,11 +58,15 @@
<!-- 表单弹窗添加/修改 -->
<mail-template-form ref="modalRef" @success="getList" />
<!-- 表单弹窗发送测试 -->
<mail-template-send ref="sendRef" />
</template>
<script setup lang="ts" name="MailTemplate">
import { allSchemas } from './template.data'
import * as MailTemplateApi from '@/api/system/mail/template'
import MailTemplateForm from './form.vue'
import MailTemplateSend from './send.vue'
// tableObject表格的属性对象可获得分页大小、条数等属性
// tableMethods表格的操作对象可进行获得分页、删除记录等操作
@ -77,6 +89,12 @@ const handleDelete = (id: number) => {
tableMethods.delList(id, false)
}
/** 发送测试操作 */
const sendRef = ref()
const openSend = (id: number) => {
sendRef.value.openModal(id)
}
/** 初始化 **/
onMounted(() => {
getList()