标签管理修改提示语

This commit is contained in:
王卓煜
2025-09-28 11:03:09 +08:00
parent 7230bd18e8
commit 18f3804536

View File

@@ -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
}