mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 17:36:42 +08:00
标签管理修改提示语
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
:remote-method="debouncedSearch"
|
||||
:loading="loading"
|
||||
:disabled="sysTypeList.length===0"
|
||||
placeholder="按回车键Enter创建标签"
|
||||
placeholder="请输入标签名称"
|
||||
@remove-tag="handleTagRemove"
|
||||
@change="handleSelectionChange"
|
||||
@keyup.enter.native="handleEnterKey"
|
||||
@@ -113,6 +113,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.params = {};
|
||||
},
|
||||
// 修改doSearch方法,添加搜索结果为空时的提示
|
||||
async doSearch(query) {
|
||||
if (!query.trim()) {
|
||||
this.searchResults = []
|
||||
@@ -126,6 +127,10 @@ export default {
|
||||
this.tagMap.set(item.id, item)
|
||||
})
|
||||
this.searchResults = tags
|
||||
// 当搜索结果为空时,提示用户可以按回车键创建标签
|
||||
if (tags.length === 0) {
|
||||
this.$message.info('无此标签,按回车键创建')
|
||||
}
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user