Explorar o código

显隐列初始默认隐藏列

RuoYi %!s(int64=4) %!d(string=hai) anos
pai
achega
27d137a4ae
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      ruoyi-ui/src/components/RightToolbar/index.vue

+ 8 - 1
ruoyi-ui/src/components/RightToolbar/index.vue

@@ -43,7 +43,14 @@ export default {
       type: Array,
     },
   },
-
+  created() {
+    // 显隐列初始默认隐藏列
+    for (let item in this.columns) {
+      if (this.columns[item].visible === false) {
+        this.value.push(parseInt(item));
+      }
+    }
+  },
   methods: {
     // 搜索
     toggleSearch() {