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