index.vue 615 B

12345678910111213141516171819202122232425
  1. <template>
  2. <ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
  3. <IFrame v-if="!loading" v-loading="loading" :src="src" />
  4. </ContentWrap>
  5. </template>
  6. <script lang="ts" setup>
  7. import * as ConfigApi from '@/api/infra/config'
  8. defineOptions({ name: 'InfraSkyWalking' })
  9. const loading = ref(true) // 是否加载中
  10. const src = ref('http://skywalking.shop.iocoder.cn')
  11. /** 初始化 */
  12. onMounted(async () => {
  13. try {
  14. const data = await ConfigApi.getConfigKey('url.skywalking')
  15. if (data && data.length > 0) {
  16. src.value = data
  17. }
  18. } finally {
  19. loading.value = false
  20. }
  21. })
  22. </script>