From 32e368a87045c93f09370b6051284ab6fabc4bd0 Mon Sep 17 00:00:00 2001 From: zhangshuaibao <15731629597@163.com> Date: 星期四, 18 三月 2021 17:32:50 +0800 Subject: [PATCH] Merge branch 'master' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork --- src/components/table/components/WasteWater.vue | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/components/table/components/WasteWater.vue b/src/components/table/components/WasteWater.vue index 8cbdc0e..0d88a05 100644 --- a/src/components/table/components/WasteWater.vue +++ b/src/components/table/components/WasteWater.vue @@ -12,21 +12,18 @@ width="30px" label="" > - <template> + <template slot-scope="{row,$index}"> +<!-- <i class="el-icon-caret-right" v-if="$index ===1"></i>--> <el-popover placement="bottom" trigger="click" + :disabled="!isShowIcon" popper-class="popovers" > - <ChemicalWastewater></ChemicalWastewater> - <i class="el-icon-caret-right" slot="reference" v-if="!isShowIcon" @click="doIcon"></i> -<!-- <i class="el-icon-caret-bottom" slot="reference" v-else-if="isShowIcon&&$index===1"></i>--> -<!-- <i class="el-icon-caret-bottom" v-else-if="isShowIcon&&scope.row.index===1"></i>--> -<!-- <i v-if="isShowIcon" class="el-icon-caret-bottom" slot="reference" @click="isbtn"></i>--> -<!-- <i v-else class="el-icon-caret-right" slot="reference" @click="isbtn"></i>--> - </el-popover> -<!-- <i class="el-icon-caret-right" v-if="!isShowIcon"></i>--> -<!-- <i class="el-icon-caret-bottom" v-else-if="isShowIcon&&scope.row.index===1"></i>--> + <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> + </el-popover> </template> </el-table-column> <el-table-column @@ -43,7 +40,7 @@ <div v-else-if="scope.row.UserName==='澶╂触鐭冲寲'" style="color: #00ffff">{{scope.row.UserName}}</div> <div v-else >{{scope.row.UserName}}</div> </template> - </el-table-column>v- + </el-table-column> <el-table-column prop="WasteWaters" label="澶栨帓搴熸按閲忥紙m鲁锛�" @@ -149,7 +146,6 @@ }, data () { return { - show: false, isShowIcon: false, tableData: [{ UserName: '闆嗗洟鍚嶇О', @@ -214,9 +210,12 @@ handle (row, column, event, cell) { console.log(row.UserName) }, - doIcon () { - console.log(1) - this.isShowIcon = !this.isShowIcon + doIcon (index) { + if (index === 1) { + this.isShowIcon = !this.isShowIcon + } else { + this.isShowIcon = false + } } } } -- Gitblit v1.8.0