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:
@@ -11,7 +11,7 @@
|
|||||||
:remote-method="debouncedSearch"
|
:remote-method="debouncedSearch"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:disabled="sysTypeList.length===0"
|
:disabled="sysTypeList.length===0"
|
||||||
placeholder="按回车键Enter创建标签"
|
placeholder="请输入标签名称"
|
||||||
@remove-tag="handleTagRemove"
|
@remove-tag="handleTagRemove"
|
||||||
@change="handleSelectionChange"
|
@change="handleSelectionChange"
|
||||||
@keyup.enter.native="handleEnterKey"
|
@keyup.enter.native="handleEnterKey"
|
||||||
@@ -113,6 +113,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.params = {};
|
this.params = {};
|
||||||
},
|
},
|
||||||
|
// 修改doSearch方法,添加搜索结果为空时的提示
|
||||||
async doSearch(query) {
|
async doSearch(query) {
|
||||||
if (!query.trim()) {
|
if (!query.trim()) {
|
||||||
this.searchResults = []
|
this.searchResults = []
|
||||||
@@ -126,6 +127,10 @@ export default {
|
|||||||
this.tagMap.set(item.id, item)
|
this.tagMap.set(item.id, item)
|
||||||
})
|
})
|
||||||
this.searchResults = tags
|
this.searchResults = tags
|
||||||
|
// 当搜索结果为空时,提示用户可以按回车键创建标签
|
||||||
|
if (tags.length === 0) {
|
||||||
|
this.$message.info('无此标签,按回车键创建')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user