From e4af41e89adc5f96a5c1708c4fa77e4d342f7d0e Mon Sep 17 00:00:00 2001 From: 若依 <yzz_ivy@163.com> Date: 星期五, 27 五月 2022 16:53:42 +0800 Subject: [PATCH] !497 增加对空字符串参数的过滤 Merge pull request !497 from root/master --- 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