This commit is contained in:
xiaozhiyong
2023-08-31 09:35:30 +08:00
parent 7028fde296
commit 20728f6e13
10 changed files with 31 additions and 56 deletions

View File

@@ -188,7 +188,6 @@ export default {
this.showSelector = !this.showSelector;
},
clearSelector() {
console.log('这里是组件里清除')
this.selectItem = { key: '', value: '' };
this.inputVal = '';
this.showSelector = false;
@@ -196,7 +195,6 @@ export default {
this.$emit('clear');
},
onFocus() {
console.log('这里是是input foucus')
if (this.inputVal) {
this.showSelector = false;
// this.inputVal = '';
@@ -204,29 +202,29 @@ export default {
},
// 组件input失焦
onBlur() {
console.log('这里是input失焦')
// this.showSelector = !this.showSelector;
setTimeout(() => {
if (this.selectItem.value) {
console.log('这里是this.selectItem.value',this.selectItem.value)
const selectItem = JSON.parse(JSON.stringify(this.selectItem));
this.inputVal = selectItem.value;
} else {
console.log('123')
this.inputVal = '';
}
// this.showSelector = false;
}, 50);
},
onSelectorClick(item) {
console.log('这类似组件内',item)
this.selectItem = item;
this.inputVal = item.value;
this.showSelector = false;
this.$emit('select', item.key, item);
},
onInput() {
console.log('这类似inputchange',this.inputVal)
setTimeout(() => {
if (this.inputVal && this.inputVal!=='') {
this.isLoading = true;