Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e42a9aa6
authored
Mar 17, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vue3 重构:基本完善完 邮件账号 的重构
parent
a784bc7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
src/views/system/mail/account/account.data.ts
+1
-1
src/views/system/mail/account/form.vue
+2
-3
src/views/system/mail/account/index.vue
+5
-5
No files found.
src/views/system/mail/account/account.data.ts
View file @
e42a9aa6
...
@@ -23,7 +23,7 @@ export const rules = reactive({
...
@@ -23,7 +23,7 @@ export const rules = reactive({
sslEnable
:
[
required
]
sslEnable
:
[
required
]
})
})
// CrudSchema
// CrudSchema
:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
const
crudSchemas
=
reactive
<
CrudSchema
[]
>
([
const
crudSchemas
=
reactive
<
CrudSchema
[]
>
([
{
{
label
:
'邮箱'
,
label
:
'邮箱'
,
...
...
src/views/system/mail/account/form.vue
View file @
e42a9aa6
<
template
>
<
template
>
<Dialog
:title=
"modelTitle"
v-model=
"modelVisible"
>
<Dialog
:title=
"modelTitle"
v-model=
"modelVisible"
>
<!-- TODO 芋艿:loading -->
<Form
ref=
"formRef"
:schema=
"allSchemas.formSchema"
:rules=
"rules"
v-loading=
"formLoading"
/>
<Form
ref=
"formRef"
:schema=
"allSchemas.formSchema"
:rules=
"rules"
:isCol=
"false"
/>
<template
#
footer
>
<template
#
footer
>
<el-button
@
click=
"submitForm"
type=
"primary"
:disabled=
"formLoading"
>
确 定
</el-button>
<el-button
@
click=
"submitForm"
type=
"primary"
:disabled=
"formLoading"
>
确 定
</el-button>
<el-button
@
click=
"modelVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"modelVisible = false"
>
取 消
</el-button>
...
@@ -12,7 +11,6 @@
...
@@ -12,7 +11,6 @@
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
import
{
rules
,
allSchemas
}
from
'./account.data'
import
{
rules
,
allSchemas
}
from
'./account.data'
const
formRef
=
ref
()
// 表单 Ref
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
...
@@ -20,6 +18,7 @@ const modelVisible = ref(false) // 弹窗的是否展示
...
@@ -20,6 +18,7 @@ const modelVisible = ref(false) // 弹窗的是否展示
const
modelTitle
=
ref
(
''
)
// 弹窗的标题
const
modelTitle
=
ref
(
''
)
// 弹窗的标题
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const
formType
=
ref
(
''
)
// 表单的类型:create - 新增;update - 修改
const
formType
=
ref
(
''
)
// 表单的类型:create - 新增;update - 修改
const
formRef
=
ref
()
// 表单 Ref
/** 打开弹窗 */
/** 打开弹窗 */
const
openModal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
const
openModal
=
async
(
type
:
string
,
id
?:
number
)
=>
{
...
...
src/views/system/mail/account/index.vue
View file @
e42a9aa6
<
template
>
<
template
>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<
ContentW
rap>
<
content-w
rap>
<Search
:schema=
"allSchemas.searchSchema"
@
search=
"setSearchParams"
@
reset=
"setSearchParams"
>
<Search
:schema=
"allSchemas.searchSchema"
@
search=
"setSearchParams"
@
reset=
"setSearchParams"
>
<!-- 新增等操作按钮 -->
<!-- 新增等操作按钮 -->
<template
#
actionMore
>
<template
#
actionMore
>
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
</el-button>
</el-button>
</
template
>
</
template
>
</Search>
</Search>
</
ContentW
rap>
</
content-w
rap>
<!-- 列表 -->
<!-- 列表 -->
<
ContentW
rap>
<
content-w
rap>
<Table
<Table
:columns=
"allSchemas.tableColumns"
:columns=
"allSchemas.tableColumns"
:data=
"tableObject.tableList"
:data=
"tableObject.tableList"
...
@@ -46,10 +46,10 @@
...
@@ -46,10 +46,10 @@
</el-button>
</el-button>
</
template
>
</
template
>
</Table>
</Table>
</
ContentW
rap>
</
content-w
rap>
<!-- 表单弹窗:添加/修改 -->
<!-- 表单弹窗:添加/修改 -->
<
MailAccountF
orm
ref=
"modalRef"
@
success=
"getList"
/>
<
mail-account-f
orm
ref=
"modalRef"
@
success=
"getList"
/>
</template>
</template>
<
script
setup
lang=
"ts"
name=
"MailAccount"
>
<
script
setup
lang=
"ts"
name=
"MailAccount"
>
import
{
allSchemas
}
from
'./account.data'
import
{
allSchemas
}
from
'./account.data'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment