mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
标签调整
This commit is contained in:
@@ -177,10 +177,15 @@ export default {
|
||||
handleEnterKey(event) {
|
||||
const inputVal = event.target.value?.trim()
|
||||
if (!this.searchResults.length && inputVal && this.selectedTags.length < this.maxTags) {
|
||||
console.log(' 标签输入框 : ' + event.target.value.trim() )
|
||||
this.createNewTag(event.target.value.trim())
|
||||
event.target.value = ''
|
||||
console.log(' createNewTag后 标签输入框 : ' + event.target.value.trim() )
|
||||
} else if (this.selectedTags.length >= this.maxTags) {
|
||||
this.$message.warning('最多只能添加5个标签')
|
||||
event.target.value = ''
|
||||
}else {
|
||||
event.target.value = ''
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user