From 258335cc6599dacd6130e1da988a403efe67219d Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 23 九月 2021 09:38:16 +0800
Subject: [PATCH] 新增通用方法简化模态/缓存使用

---
 ruoyi-ui/src/views/monitor/server/index.vue |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/ruoyi-ui/src/views/monitor/server/index.vue b/ruoyi-ui/src/views/monitor/server/index.vue
index 6a5060d..0965a93 100644
--- a/ruoyi-ui/src/views/monitor/server/index.vue
+++ b/ruoyi-ui/src/views/monitor/server/index.vue
@@ -153,7 +153,7 @@
                 </tr>
               </thead>
               <tbody v-if="server.sysFiles">
-                <tr v-for="sysFile in server.sysFiles">
+                <tr v-for="(sysFile, index) in sysFiles" :key="index">
                   <td><div class="cell">{{ sysFile.dirName }}</div></td>
                   <td><div class="cell">{{ sysFile.sysTypeName }}</div></td>
                   <td><div class="cell">{{ sysFile.typeName }}</div></td>
@@ -178,8 +178,6 @@
   name: "Server",
   data() {
     return {
-      // 鍔犺浇灞備俊鎭�
-      loading: [],
       // 鏈嶅姟鍣ㄤ俊鎭�
       server: []
     };
@@ -193,17 +191,12 @@
     getList() {
       getServer().then(response => {
         this.server = response.data;
-        this.loading.close();
+        this.$modal.closeLoading();
       });
     },
     // 鎵撳紑鍔犺浇灞�
     openLoading() {
-      this.loading = this.$loading({
-        lock: true,
-        text: "鎷煎懡璇诲彇涓�",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
+      this.$modal.loading("姝e湪鍔犺浇鏈嶅姟鐩戞帶鏁版嵁锛岃绋嶅悗锛�");
     }
   }
 };

--
Gitblit v1.9.3