mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
还原
This commit is contained in:
@@ -261,24 +261,10 @@ export default {
|
||||
console.log("----------newTag---------->",this.searchResults)
|
||||
this.tagMap.set(newTag.id, newTag)
|
||||
this.$emit('change', this.displayTags)
|
||||
this.clearInput();
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
|
||||
clearInput() {
|
||||
if (this.$refs.tagSelect) {
|
||||
const input = this.$refs.tagSelect.$refs.input;
|
||||
if (input) {
|
||||
input.value = '';
|
||||
// 触发输入事件以确保组件状态同步
|
||||
input.dispatchEvent(new Event('input'));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 修改doSearch方法,添加搜索结果为空时的提示
|
||||
async doSearch(query) {
|
||||
// 不再在空查询时清空搜索结果
|
||||
|
||||
Reference in New Issue
Block a user