|
|
|
@ -115,7 +115,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
value (nval, oval) {
|
|
|
|
|
if (nval !== oval) {
|
|
|
|
|
console.log('=== 6. select 修改 - value变化 ===', nval, oval)
|
|
|
|
|
this.handleValueChange(nval)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -308,8 +308,23 @@ export default {
|
|
|
|
|
return option.componentOptions.children[1].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleValueChange(val) {
|
|
|
|
|
this.inEdit = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inEdit = false
|
|
|
|
|
}, 800)
|
|
|
|
|
this.selectList.map((item, index) => {
|
|
|
|
|
if (`${item[this.showLabel[0]]}${index}` === val) {
|
|
|
|
|
this.value = item[this.showLabel[0]]
|
|
|
|
|
this.$emit('change', {
|
|
|
|
|
type: this.type,
|
|
|
|
|
res: this.selectList[index]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleChange (op) {
|
|
|
|
|
console.log('=== 1. select 修改 - change ===', op)
|
|
|
|
|
// this.selectOpen = !this.selectOpen
|
|
|
|
|
this.inEdit = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -366,7 +381,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleSearch (e) {
|
|
|
|
|
// console.log('=== 2. select 修改 - search ===', e)
|
|
|
|
|
if (this.openSearch) {
|
|
|
|
|
this.inEdit = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -403,7 +417,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
openSelect() {
|
|
|
|
|
// console.log('=== 3. select 修改 - openSelect ===', this.value)
|
|
|
|
|
if (!this.open) {
|
|
|
|
|
this.getSelectFirst('', false)
|
|
|
|
|
} else {
|
|
|
|
@ -411,11 +424,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectOption() {
|
|
|
|
|
// console.log('=== 4. select 修改 - selectOption ===', this.value)
|
|
|
|
|
this.open = false
|
|
|
|
|
},
|
|
|
|
|
getSelectBlur (e) {
|
|
|
|
|
// console.log('=== 5. select 修改 - getSelectBlur ===', e, this.defaultVal, this.value)
|
|
|
|
|
this.open = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|