From 8558954da733b59e374ece8f451b3f5ba2f5ed46 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期一, 27 六月 2022 08:10:17 +0800
Subject: [PATCH] !516 修复缓存列表页面变量名错误导致错误 Merge pull request !516 from zbk/N/A

---
 ruoyi-ui/src/components/RightToolbar/index.vue |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue
index 9bf9722..976974e 100644
--- a/ruoyi-ui/src/components/RightToolbar/index.vue
+++ b/ruoyi-ui/src/components/RightToolbar/index.vue
@@ -43,7 +43,14 @@
       type: Array,
     },
   },
-
+  created() {
+    // 显隐列初始默认隐藏列
+    for (let item in this.columns) {
+      if (this.columns[item].visible === false) {
+        this.value.push(parseInt(item));
+      }
+    }
+  },
   methods: {
     // 搜索
     toggleSearch() {
@@ -55,7 +62,7 @@
     },
     // 右侧列表元素变化
     dataChange(data) {
-      for (var item in this.columns) {
+      for (let item in this.columns) {
         const key = this.columns[item].key;
         this.columns[item].visible = !data.includes(key);
       }

--
Gitblit v1.9.2