From 77536cfa95b1e3c5e60f94dce3a53aa2e93f121a Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123 <819527061@qq.com> Date: 星期三, 14 九月 2022 17:35:54 +0800 Subject: [PATCH] echarts添加显示隐藏按钮 --- src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue index 25b7326..6178120 100644 --- a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue +++ b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue @@ -3,6 +3,7 @@ <div class="danwei-box">鍗曚綅锛氫汉</div> <div class="shebaoZhengjiShouruForm-table"> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" border style="width: 100%" @@ -52,13 +53,18 @@ }, data() { return { - tableHeight: window.innerHeight - nowSize(350) + tableHeight: window.innerHeight - nowSize(380) } }, methods: { getHeight() { this.tableHeight = window.innerHeight - nowSize(350) - } + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, }, created() { window.addEventListener('resize', this.getHeight) -- Gitblit v1.9.1