提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<ContentWrap> |
|
3 |
<IFrame :src="src" /> |
|
4 |
</ContentWrap> |
|
5 |
</template> |
|
6 |
<script lang="ts" setup> |
|
7 |
import * as ConfigApi from '@/api/infra/config' |
|
8 |
|
|
9 |
defineOptions({ name: 'InfraSwagger' }) |
|
10 |
|
|
11 |
const loading = ref(true) // 是否加载中 |
effbd8
|
12 |
const src = ref(import.meta.env.VITE_BASE_URL + '/doc.html') |
820397
|
13 |
|
H |
14 |
/** 初始化 */ |
|
15 |
onMounted(async () => { |
|
16 |
try { |
|
17 |
const data = await ConfigApi.getConfigKey('url.swagger') |
|
18 |
if (data && data.length > 0) { |
|
19 |
src.value = data |
|
20 |
} |
|
21 |
} finally { |
|
22 |
loading.value = false |
|
23 |
} |
|
24 |
}) |
|
25 |
</script> |