Kaynağa Gözat

fix:修改加载状态的背景颜色

liu.shiyi 1 yıl önce
ebeveyn
işleme
23eb0cabea

+ 1 - 0
data-room-ui/packages/BasicComponents/ScreenScrollBoard/index.vue

@@ -2,6 +2,7 @@
   <div
     v-loading="config.loading"
     element-loading-text="数据加载中"
+    :element-loading-background="loadingBackground"
     style="width: 100%;height: 100%"
     class="bs-design-wrap"
   >

+ 1 - 0
data-room-ui/packages/BasicComponents/ScreenScrollRanking/index.vue

@@ -2,6 +2,7 @@
   <div
     v-loading="config.loading"
     element-loading-text="数据加载中"
+    :element-loading-background="loadingBackground"
     style="width: 100%;height: 100%"
     class="bs-design-wrap"
   >

+ 1 - 0
data-room-ui/packages/BasicComponents/Tables/index.vue

@@ -2,6 +2,7 @@
   <div
     v-loading="config.loading"
     element-loading-text="数据加载中"
+    :element-loading-background="loadingBackground"
     style="width: 100%;height: 100%"
     class="bs-design-wrap "
   >

+ 1 - 0
data-room-ui/packages/PlotRender/index.vue

@@ -2,6 +2,7 @@
   <div
     v-loading="config.loading"
     element-loading-text="图表加载中"
+    :element-loading-background="loadingBackground"
     style="width: 100%;height: 100%"
     class="bs-design-wrap bs-custom-component"
     :class="{'light-theme':customTheme === 'light','auto-theme':customTheme !=='light'}"

+ 4 - 0
data-room-ui/packages/js/mixins/commonMixins.js

@@ -25,6 +25,10 @@ export default {
       customTheme: state => state.bigScreen.pageInfo.pageConfig.customTheme,
       activeCode: state => state.bigScreen.activeCode
     }),
+    // 组件数据加载时的背景颜色
+    loadingBackground () {
+      return this.customTheme === 'light' ? '#ffffff' : '#151A26'
+    },
     isPreview () {
       return (this.$route.path === window?.BS_CONFIG?.routers?.previewUrl) || (this.$route.path === '/big-screen/preview')
     }