mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 20:06:44 +08:00
调整日志
This commit is contained in:
@@ -169,7 +169,12 @@ export default {
|
|||||||
|
|
||||||
//按回车键,创建新标签
|
//按回车键,创建新标签
|
||||||
handleEnterKey(event) {
|
handleEnterKey(event) {
|
||||||
|
console.log('开始回车创建 = ' + event.target.value)
|
||||||
const inputVal = event.target.value?.trim()
|
const inputVal = event.target.value?.trim()
|
||||||
|
console.log('回车创建 inputVal= ' + inputVal)
|
||||||
|
this.clearInput();
|
||||||
|
console.log('回车创建中 先清文字 inputVal = ' + inputVal)
|
||||||
|
|
||||||
if (!inputVal) return;
|
if (!inputVal) return;
|
||||||
// 检查是否与已选择的标签重复
|
// 检查是否与已选择的标签重复
|
||||||
const isDuplicate = this.selectedTags.some(tag => tag.tagName === inputVal);
|
const isDuplicate = this.selectedTags.some(tag => tag.tagName === inputVal);
|
||||||
@@ -204,8 +209,8 @@ export default {
|
|||||||
this.previousTags = [...newValues];
|
this.previousTags = [...newValues];
|
||||||
this.$emit('change', this.displayTags);
|
this.$emit('change', this.displayTags);
|
||||||
console.log('-- handleSelectionChange clearInput --- this.$refs.tagSelect = ' + this.$refs.tagSelect )
|
console.log('-- handleSelectionChange clearInput --- this.$refs.tagSelect = ' + this.$refs.tagSelect )
|
||||||
console.log('-- handleSelectionChange clearInput --- input.value = ' + this.$refs.tagSelect.$refs.input )
|
|
||||||
this.clearInput();
|
this.clearInput();
|
||||||
|
console.log('-- handleSelectionChange clearInput --- input.value = ' + this.$refs.tagSelect.$refs.input )
|
||||||
},
|
},
|
||||||
|
|
||||||
clearInput() {
|
clearInput() {
|
||||||
|
|||||||
Reference in New Issue
Block a user