snow 2 rokov pred
rodič
commit
fd64e1a431
1 zmenil súbory, kde vykonal 15 pridanie a 4 odobranie
  1. 15 4
      src/views/NMedia/Overview.vue

+ 15 - 4
src/views/NMedia/Overview.vue

@@ -27,6 +27,7 @@
                 <div>
                     <h3>用户数排行TOP5</h3>
                     <el-table
+                    class="margin-10"
                         :data="overview.areaTop5 || []"
                         style="width: 100%"
                         :header-cell-style="{
@@ -356,9 +357,10 @@ import {
     getOverviewPage,
 } from "@/api/index";
 import * as echarts from "echarts";
-
+import { ElLoading } from 'element-plus'
 // import config from "@/config/index";
 let chart = undefined;
+const loadingInstance = ElLoading.service({ fullscreen: true, text: 'Loading', background: 'rgba(255, 255, 255, 0.9)' })
 export default {
     name: "region",
     data() {
@@ -373,10 +375,11 @@ export default {
             item: {},
             version: [],
             channel: [],
-            overview:{}
+            overview:{},
         };
     },
-    async mounted() {
+    created() {
+      console.log(loadingInstance)
         if (echarts) {
             echarts.registerMap("China", china);
             echarts.registerMap("ShanXi", shanxi);
@@ -408,6 +411,7 @@ export default {
       
       getOverviewPage()
         .then(r => {
+          loadingInstance.close()
             this.overview = r
             this.overview.areaTop5 = r.area.slice(0,5)
             console.log(r)
@@ -445,7 +449,7 @@ export default {
       }
       chart.clear();
       chart.resize({
-        height: 1046,
+        height: 1055,
       });
       //   let min = list[list.length - 1].userSum;
       const p = {
@@ -831,4 +835,11 @@ export default {
   width: 100%;
 }
 
+.el-loading-mask.is-fullscreen{
+      position: fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+}
 </style>