Vue3 重构:邮件模版的新增和修改操作
This commit is contained in:
@ -49,28 +49,28 @@
|
||||
</content-wrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<!-- <mail-template-form ref="modalRef" @success="getList" />-->
|
||||
<mail-template-form ref="modalRef" @success="getList" />
|
||||
</template>
|
||||
<script setup lang="ts" name="MailTemplate">
|
||||
import { allSchemas } from './template.data'
|
||||
import * as MailTemplateApi from '@/api/system/mail/template'
|
||||
// import MailAccountForm from './form.vue'
|
||||
import MailTemplateForm from './form.vue'
|
||||
|
||||
// tableObject:表格的属性对象,可获得分页大小、条数等属性
|
||||
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
|
||||
// 详细可见:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/components/table.html#usetable
|
||||
const { tableObject, tableMethods } = useTable({
|
||||
getListApi: MailTemplateApi.getMailTemplatePageApi, // 分页接口
|
||||
delListApi: MailTemplateApi.deleteMailTemplateApi // 删除接口
|
||||
getListApi: MailTemplateApi.getMailTemplatePage, // 分页接口
|
||||
delListApi: MailTemplateApi.deleteMailTemplate // 删除接口
|
||||
})
|
||||
// 获得表格的各种操作
|
||||
const { getList, setSearchParams } = tableMethods
|
||||
|
||||
/** 添加/修改操作 */
|
||||
// const modalRef = ref()
|
||||
// const openModal = (type: string, id?: number) => {
|
||||
// modalRef.value.openModal(type, id)
|
||||
// }
|
||||
const modalRef = ref()
|
||||
const openModal = (type: string, id?: number) => {
|
||||
modalRef.value.openModal(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = (id: number) => {
|
||||
|
||||
Reference in New Issue
Block a user