提交 | 用户 | 时间
|
314507
|
1 |
<template> |
H |
2 |
<Dialog v-model="dialogVisible" title="详情"> |
|
3 |
<Descriptions :data="detailData" :schema="allSchemas.detailSchema" /> |
|
4 |
</Dialog> |
|
5 |
</template> |
|
6 |
<script lang="ts" setup> |
|
7 |
import * as MailAccountApi from '@/api/system/mail/account' |
|
8 |
import { allSchemas } from './account.data' |
|
9 |
|
|
10 |
defineOptions({ name: 'SystemMailAccountDetail' }) |
|
11 |
|
|
12 |
const dialogVisible = ref(false) // 弹窗的是否展示 |
|
13 |
const detailLoading = ref(false) // 表单的加载中 |
|
14 |
const detailData = ref() // 详情数据 |
|
15 |
|
|
16 |
/** 打开弹窗 */ |
|
17 |
const open = async (id: number) => { |
|
18 |
dialogVisible.value = true |
|
19 |
// 设置数据 |
|
20 |
detailLoading.value = true |
|
21 |
try { |
|
22 |
detailData.value = await MailAccountApi.getMailAccount(id) |
|
23 |
} finally { |
|
24 |
detailLoading.value = false |
|
25 |
} |
|
26 |
} |
|
27 |
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
28 |
</script> |