Skip to content

Commit

Permalink
Fixed: Fixed the issue where tag deletion required double-click
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoJiSen committed Jan 13, 2025
1 parent 2f9ad17 commit fdb1dd8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/Table/TagSearch/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
size="small"
type="info"
@click="handleTagClick(v,k)"
@close="handleTagClose(k)"
@close.stop="handleTagClose(k)"
>
<strong v-if="v.label">{{ v.label + ':' }}</strong>
<span v-if="v.valueLabel">{{ v.valueLabel }}</span>
Expand Down Expand Up @@ -128,7 +128,7 @@ export default {
deep: true
},
filterTags: {
handler() {
handler(newValue) {
this.$emit('tag-search', this.filterMaps)
},
deep: true
Expand All @@ -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() {
Expand Down

0 comments on commit fdb1dd8

Please sign in to comment.