diff --git a/src/components/Table/TagSearch/index.vue b/src/components/Table/TagSearch/index.vue
index e40ebf538..b65f2736e 100644
--- a/src/components/Table/TagSearch/index.vue
+++ b/src/components/Table/TagSearch/index.vue
@@ -17,7 +17,7 @@
size="small"
type="info"
@click="handleTagClick(v,k)"
- @close="handleTagClose(k)"
+ @close.stop="handleTagClose(k)"
>
{{ v.label + ':' }}
{{ v.valueLabel }}
@@ -128,7 +128,7 @@ export default {
deep: true
},
filterTags: {
- handler() {
+ handler(newValue) {
this.$emit('tag-search', this.filterMaps)
},
deep: true
@@ -137,6 +137,15 @@ export default {
if (newValue === '' && oldValue !== '') {
this.emptyCount = 1
}
+ },
+ '$route'(to, from) {
+ if (from.query !== to.query) {
+ this.filterTags = {}
+ if (to.query && Object.keys(to.query).length) {
+ const routeFilter = this.checkInTableColumns(this.options)
+ this.filterTagSearch(routeFilter)
+ }
+ }
}
},
mounted() {