Merge pull request #12258 from dataease/pr@dev-v2_st

fix(仪表板): v2 公共链接视图明细导出优化 #11487
This commit is contained in:
dataeaseShu 2024-09-18 15:52:01 +08:00 committed by GitHub
commit 43405628ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -16,7 +16,7 @@ export const tryHideLoading = identification => {
/**
* 说明
* 要在view中加loading只需要两个步骤
* 1.在vue页面文件中加 v-loading="requestStore.loadingMap[requestStore.currentPath]"
* 1.在vue页面文件中加 v-loading="requestStore.loadingMap[permissionStore.currentPath]"
* 例如views/system/user/index.vue
* 2.在需要loading的api中添加config {loading: true}
* 例如api/system/user.js中userLists方法 需要配置loading: true

View File

@ -1,5 +1,8 @@
<template>
<div class="link-container" v-loading="loading">
<div
class="link-container"
v-loading="loading || requestStore.loadingMap[permissionStore.currentPath]"
>
<IframeError v-if="!loading && iframeError" />
<LinkError v-else-if="!loading && !linkExist" />
<Exp v-else-if="!loading && linkExp" />
@ -18,6 +21,8 @@
</template>
<script lang="ts" setup>
import { onMounted, nextTick, ref, reactive } from 'vue'
import { useRequestStoreWithOut } from '@/store/modules/request'
import { usePermissionStoreWithOut } from '@/store/modules/permission'
import PreviewCanvas from '@/views/data-visualization/PreviewCanvas.vue'
import { ProxyInfo, shareProxy } from './ShareProxy'
import Exp from './exp.vue'
@ -25,6 +30,8 @@ import LinkError from './error.vue'
import PwdTips from './pwd.vue'
import IframeError from './IframeError.vue'
import TicketError from './TicketError.vue'
const requestStore = useRequestStoreWithOut()
const permissionStore = usePermissionStoreWithOut()
const pcanvas = ref(null)
const iframeError = ref(true)
const linkExist = ref(false)