From af6a08398e2bc22f3c8a3a615cbd9e23190be906 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 12 五月 2022 10:55:44 +0800
Subject: [PATCH] update 优化 文件与图片上传组件 使用id存储回显

---
 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.3