调整日志

This commit is contained in:
670788339
2025-11-04 10:23:30 +08:00
parent 6afc19d21c
commit 973e3f947d

View File

@@ -172,7 +172,7 @@ export default {
console.log('开始回车创建 = ' + event.target.value)
const inputVal = event.target.value?.trim()
console.log('回车创建 inputVal= ' + inputVal)
this.clearInput();
// this.clearInput();
console.log('回车创建中 先清文字 inputVal = ' + inputVal)
if (!inputVal) return;
@@ -214,11 +214,18 @@ export default {
},
clearInput() {
if (this.$refs.tagSelect) {
/*if (this.$refs.tagSelect) {
const input = this.$refs.tagSelect.$refs.input;
if (input) {
input.value = '';
}
}*/
// 方案1通过 ref 直接操作 el-select 的输入框
if (this.$refs.tagSelect) {
const input = this.$refs.tagSelect.$el.querySelector('input');
if (input) {
input.value = '';
}
}
},