From 2ccfcb5a17c31ade0b532d7cc77c9a65aed1343c Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期一, 12 四月 2021 09:55:05 +0800 Subject: [PATCH] echarts实时数据 --- src/components/table/components/WasteWater.vue | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/table/components/WasteWater.vue b/src/components/table/components/WasteWater.vue index 0d88a05..af191ce 100644 --- a/src/components/table/components/WasteWater.vue +++ b/src/components/table/components/WasteWater.vue @@ -21,8 +21,8 @@ popper-class="popovers" > <ChemicalWastewater v-show="$index ===1"></ChemicalWastewater> - <i class="el-icon-caret-right" slot="reference" v-if="!isShowIcon" @click="doIcon($index)"></i> - <i class="el-icon-caret-bottom" slot="reference" v-else @click="doIcon($index)"></i> + <i class="el-icon-caret-right" :class="{active: isActive === $index}" slot="reference" @click="doIcon($index)"></i> +<!-- <i class="el-icon-caret-bottom" slot="reference" v-else @click="doIcon($index)"></i>--> </el-popover> </template> </el-table-column> @@ -82,7 +82,7 @@ width="200" trigger="click" popper-class="popovers" - title="XXX1鏄庣粏琛�" + title="鐩戞祴鐐规槑缁嗚〃" > <refinery></refinery> <u slot="reference" style="color: #00ffff">{{row.normal}}</u> @@ -146,6 +146,7 @@ }, data () { return { + isActive: '', isShowIcon: false, tableData: [{ UserName: '闆嗗洟鍚嶇О', @@ -211,11 +212,17 @@ console.log(row.UserName) }, doIcon (index) { - if (index === 1) { - this.isShowIcon = !this.isShowIcon - } else { + if (index !== 1) { this.isShowIcon = false + this.isActive = '' + return } + this.isShowIcon = !this.isShowIcon + if (index === this.isActive) { + this.isActive = '' + return + } + this.isActive = index } } } @@ -229,5 +236,9 @@ .popovers.el-popover{ padding:0; } +.active { + /*color: red;*/ + transform:rotate(90deg); +} </style> -- Gitblit v1.8.0