Merge pull request #1878 from dataease/pr@dev@fix_tabs_switch_filter

fix: tabs选项卡切换后条件无效
This commit is contained in:
fit2cloud-chenyw 2022-03-03 14:34:47 +08:00 committed by GitHub
commit 0ec378fa51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
<template>
<div class="de-tabs-div">
<el-tabs v-model="activeTabName" type="card" class="de-tabs">
<el-tabs v-model="activeTabName" type="card" class="de-tabs" @tab-click="handleClick">
<el-tab-pane
v-for="(item, index) in element.options.tabList"
:key="item.name+index"
@ -295,6 +295,15 @@ export default {
},
chartResize() {
// this.$refs[this.activeTabName]
},
handleClick(tab) {
const name = tab.name
this.element.options.tabList.forEach(item => {
if (item && item.name === name && item.content && item.content.propValue && item.content.propValue.viewId) {
this.filterMap[item.content.propValue.viewId] = item.content.filters
}
})
// console.log(tab)
}
}