Skip to content

Commit e42a9aa

Browse files
committed
Vue3 重构:基本完善完 邮件账号 的重构
1 parent a784bc7 commit e42a9aa

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/views/system/mail/account/account.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const rules = reactive({
2323
sslEnable: [required]
2424
})
2525

26-
// CrudSchema
26+
// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
2727
const crudSchemas = reactive<CrudSchema[]>([
2828
{
2929
label: '邮箱',

src/views/system/mail/account/form.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22
<Dialog :title="modelTitle" v-model="modelVisible">
3-
<!-- TODO 芋艿:loading -->
4-
<Form ref="formRef" :schema="allSchemas.formSchema" :rules="rules" :isCol="false" />
3+
<Form ref="formRef" :schema="allSchemas.formSchema" :rules="rules" v-loading="formLoading" />
54
<template #footer>
65
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
76
<el-button @click="modelVisible = false">取 消</el-button>
@@ -12,14 +11,14 @@
1211
import * as MailAccountApi from '@/api/system/mail/account'
1312
import { rules, allSchemas } from './account.data'
1413
15-
const formRef = ref() // 表单 Ref
1614
const { t } = useI18n() // 国际化
1715
const message = useMessage() // 消息弹窗
1816
1917
const modelVisible = ref(false) // 弹窗的是否展示
2018
const modelTitle = ref('') // 弹窗的标题
2119
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
2220
const formType = ref('') // 表单的类型:create - 新增;update - 修改
21+
const formRef = ref() // 表单 Ref
2322
2423
/** 打开弹窗 */
2524
const openModal = async (type: string, id?: number) => {

src/views/system/mail/account/index.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<!-- 搜索工作栏 -->
3-
<ContentWrap>
3+
<content-wrap>
44
<Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams">
55
<!-- 新增等操作按钮 -->
66
<template #actionMore>
@@ -13,10 +13,10 @@
1313
</el-button>
1414
</template>
1515
</Search>
16-
</ContentWrap>
16+
</content-wrap>
1717

1818
<!-- 列表 -->
19-
<ContentWrap>
19+
<content-wrap>
2020
<Table
2121
:columns="allSchemas.tableColumns"
2222
:data="tableObject.tableList"
@@ -46,10 +46,10 @@
4646
</el-button>
4747
</template>
4848
</Table>
49-
</ContentWrap>
49+
</content-wrap>
5050

5151
<!-- 表单弹窗:添加/修改 -->
52-
<MailAccountForm ref="modalRef" @success="getList" />
52+
<mail-account-form ref="modalRef" @success="getList" />
5353
</template>
5454
<script setup lang="ts" name="MailAccount">
5555
import { allSchemas } from './account.data'

0 commit comments

Comments
 (0)