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/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue
index 4ad47eb..1224121 100644
--- a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue
+++ b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue
@@ -4,6 +4,8 @@
<h1>鍒涗笟鎷呬繚璐锋缁熻琛�</h1>
<div class="chuangye-table">
<el-table
+ :max-height="tableHeight"
+ :cell-style="handleCellStyle"
border
:data="danbaoTableData"
style="width: 100%">
@@ -78,6 +80,8 @@
<h1>浜哄姏璧勬簮鏈嶅姟浜т笟鍥綋鏈堟儏鍐电粺璁¤〃</h1>
<div class="danbaotongjibiao-table">
<el-table
+ :cell-style="handleCellStyle"
+ :max-height="tableHeight"
border
:data="renliziyuanTableData"
:span-method="arraySpanMethod"
@@ -170,12 +174,14 @@
<script>
import {getLoanTable, getParkTable} from '@/api/jiuyeAndChuangye'
+ import nowSize from "../../../../libs/nowSize";
export default {
name: "chuangyeDanbaoDaikuan",
data() {
return {
danbaoTableData:[],
- renliziyuanTableData:[]
+ renliziyuanTableData:[],
+ tableHeight: (window.innerHeight - nowSize(400)) / 2
}
},
mounted() {
@@ -211,7 +217,21 @@
}
}
}
+ },
+ getHeight() {
+ this.tableHeight = (window.innerHeight - nowSize(400)) / 2
+ },
+ handleCellStyle({rowIndex, columnIndex}) {
+ if(columnIndex == 0) {
+ return {background:'#51D2FF'}
+ }
}
+ },
+ created() {
+ window.addEventListener('resize', this.getHeight)
+ },
+ destroy() {
+ window.addEventListener('resize', this.getHeight)
}
}
</script>
--
Gitblit v1.9.1