Commit 1449bfc0 authored by 杨奕's avatar 杨奕 Committed by GitHub

Table: filter-panel should hide when new one shows (#10373)

parent 190bfe64
<template> <template>
<transition name="el-zoom-in-top"> <transition name="el-zoom-in-top">
<div class="el-table-filter" v-if="multiple" v-show="showPopper"> <div
class="el-table-filter"
v-if="multiple"
v-clickoutside="handleOutsideClick"
v-show="showPopper">
<div class="el-table-filter__content"> <div class="el-table-filter__content">
<el-checkbox-group class="el-table-filter__checkbox-group" v-model="filteredValue"> <el-checkbox-group class="el-table-filter__checkbox-group" v-model="filteredValue">
<el-checkbox <el-checkbox
...@@ -16,7 +20,11 @@ ...@@ -16,7 +20,11 @@
<button @click="handleReset">{{ t('el.table.resetFilter') }}</button> <button @click="handleReset">{{ t('el.table.resetFilter') }}</button>
</div> </div>
</div> </div>
<div class="el-table-filter" v-else v-show="showPopper"> <div
class="el-table-filter"
v-else
v-clickoutside="handleOutsideClick"
v-show="showPopper">
<ul class="el-table-filter__list"> <ul class="el-table-filter__list">
<li class="el-table-filter__list-item" <li class="el-table-filter__list-item"
:class="{ 'is-active': filterValue === undefined || filterValue === null }" :class="{ 'is-active': filterValue === undefined || filterValue === null }"
...@@ -79,7 +87,9 @@ ...@@ -79,7 +87,9 @@
}, },
handleOutsideClick() { handleOutsideClick() {
setTimeout(() => {
this.showPopper = false; this.showPopper = false;
}, 16);
}, },
handleConfirm() { handleConfirm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment