feat(仪表板、数据大屏): 预览增加加载动画

This commit is contained in:
wangjiahao 2025-02-14 11:37:53 +08:00 committed by 王嘉豪
parent 5a3108d93e
commit 7f75b278e8
3 changed files with 8 additions and 5 deletions

View File

@ -29,7 +29,6 @@ const dvMainStore = dvMainStoreWithOut()
const previewCanvasContainer = ref(null)
const dashboardPreview = ref(null)
const slideShow = ref(true)
const requestStore = useRequestStoreWithOut()
const permissionStore = usePermissionStoreWithOut()
const appStore = useAppStoreWithOut()
const dataInitState = ref(true)
@ -254,7 +253,7 @@ defineExpose({
<el-container
class="preview-area"
:class="{ 'no-data': !hasTreeData }"
v-loading="requestStore.loadingMap && requestStore.loadingMap[permissionStore.currentPath]"
v-loading="!dataInitState"
>
<div
@click="slideOpenChange"

View File

@ -201,7 +201,12 @@ defineExpose({
</script>
<template>
<div class="content" :class="{ 'canvas_keep-size': dataVKeepSize }" ref="previewCanvasContainer">
<div
class="content"
v-loading="!state.initState"
:class="{ 'canvas_keep-size': dataVKeepSize }"
ref="previewCanvasContainer"
>
<de-preview
ref="dvPreview"
v-if="state.canvasStylePreview && state.initState"

View File

@ -32,7 +32,6 @@ const { dvInfo, canvasViewDataInfo } = storeToRefs(dvMainStore)
const previewCanvasContainer = ref(null)
const dvPreviewRef = ref(null)
const slideShow = ref(true)
const requestStore = useRequestStoreWithOut()
const permissionStore = usePermissionStoreWithOut()
const dataInitState = ref(true)
const downloadStatus = ref(false)
@ -258,7 +257,7 @@ onBeforeMount(() => {
<el-container
class="preview-area"
:class="{ 'no-data': !hasTreeData }"
v-loading="requestStore.loadingMap[permissionStore.currentPath]"
v-loading="!dataInitState"
>
<div @click="slideOpenChange" class="flexible-button-area" v-if="false">
<el-icon v-if="slideShow"><ArrowLeft /></el-icon>