From 06fbda53248c3e4dfdb09db2bc05a957f918bfd9 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期一, 07 十一月 2022 11:20:02 +0800 Subject: [PATCH] 修复sheet超出最大行数异常问题 --- ruoyi-ui/src/components/RightToolbar/index.vue | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/ruoyi-ui/src/components/RightToolbar/index.vue index c7ab139..776fcee 100644 --- a/ruoyi-ui/src/components/RightToolbar/index.vue +++ b/ruoyi-ui/src/components/RightToolbar/index.vue @@ -1,7 +1,7 @@ <template> - <div class="top-right-btn"> + <div class="top-right-btn" :style="style"> <el-row> - <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top" v-if="search"> <el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" /> </el-tooltip> <el-tooltip class="item" effect="dark" content="刷新" placement="top"> @@ -42,6 +42,23 @@ columns: { type: Array, }, + search: { + type: Boolean, + default: true, + }, + gutter: { + type: Number, + default: 10, + }, + }, + computed: { + style() { + const ret = {}; + if (this.gutter) { + ret.marginRight = `${this.gutter / 2}px`; + } + return ret; + } }, created() { // 显隐列初始默认隐藏列 @@ -62,7 +79,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