调整日志

This commit is contained in:
670788339
2025-11-04 10:02:27 +08:00
parent 01bbe6c5c4
commit 305a5481c8

View File

@@ -169,7 +169,12 @@ export default {
//按回车键,创建新标签
handleEnterKey(event) {
console.log('开始回车创建 = ' + event.target.value)
const inputVal = event.target.value?.trim()
console.log('回车创建 inputVal= ' + inputVal)
this.clearInput();
console.log('回车创建中 先清文字 inputVal = ' + inputVal)
if (!inputVal) return;
// 检查是否与已选择的标签重复
const isDuplicate = this.selectedTags.some(tag => tag.tagName === inputVal);
@@ -204,8 +209,8 @@ export default {
this.previousTags = [...newValues];
this.$emit('change', this.displayTags);
console.log('-- handleSelectionChange clearInput --- this.$refs.tagSelect = ' + this.$refs.tagSelect )
console.log('-- handleSelectionChange clearInput --- input.value = ' + this.$refs.tagSelect.$refs.input )
this.clearInput();
console.log('-- handleSelectionChange clearInput --- input.value = ' + this.$refs.tagSelect.$refs.input )
},
clearInput() {