mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 22:06:43 +08:00
调整日志
This commit is contained in:
@@ -172,7 +172,7 @@ export default {
|
|||||||
console.log('开始回车创建 = ' + event.target.value)
|
console.log('开始回车创建 = ' + event.target.value)
|
||||||
const inputVal = event.target.value?.trim()
|
const inputVal = event.target.value?.trim()
|
||||||
console.log('回车创建 inputVal= ' + inputVal)
|
console.log('回车创建 inputVal= ' + inputVal)
|
||||||
this.clearInput();
|
// this.clearInput();
|
||||||
console.log('回车创建中 先清文字 inputVal = ' + inputVal)
|
console.log('回车创建中 先清文字 inputVal = ' + inputVal)
|
||||||
|
|
||||||
if (!inputVal) return;
|
if (!inputVal) return;
|
||||||
@@ -214,11 +214,18 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
clearInput() {
|
clearInput() {
|
||||||
if (this.$refs.tagSelect) {
|
/*if (this.$refs.tagSelect) {
|
||||||
const input = this.$refs.tagSelect.$refs.input;
|
const input = this.$refs.tagSelect.$refs.input;
|
||||||
if (input) {
|
if (input) {
|
||||||
input.value = '';
|
input.value = '';
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
// 方案1:通过 ref 直接操作 el-select 的输入框
|
||||||
|
if (this.$refs.tagSelect) {
|
||||||
|
const input = this.$refs.tagSelect.$el.querySelector('input');
|
||||||
|
if (input) {
|
||||||
|
input.value = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user