|
|
|
@ -112,6 +112,11 @@ export default {
|
|
|
|
|
defaultVal(nval, oval) {
|
|
|
|
|
if (this.inEdit) { return false }
|
|
|
|
|
this.value = nval
|
|
|
|
|
},
|
|
|
|
|
value (nval, oval) {
|
|
|
|
|
if (nval !== oval) {
|
|
|
|
|
console.log('=== 6. select 修改 - value变化 ===', nval, oval)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -304,6 +309,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleChange (op) {
|
|
|
|
|
console.log('=== 1. select 修改 - change ===', op)
|
|
|
|
|
// this.selectOpen = !this.selectOpen
|
|
|
|
|
this.inEdit = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -325,7 +331,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
getSelectFirst (e, canClick = true) {
|
|
|
|
|
if (canClick) {
|
|
|
|
|
document.getElementsByClassName(`select-input-${this.type}`)[0].click()
|
|
|
|
|
this.$refs.selectView.$refs.vcSelect.$refs.arrow.click()
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.selectView.$refs.vcSelect.focus()
|
|
|
|
|
}
|
|
|
|
@ -360,6 +366,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleSearch (e) {
|
|
|
|
|
// console.log('=== 2. select 修改 - search ===', e)
|
|
|
|
|
if (this.openSearch) {
|
|
|
|
|
this.inEdit = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -396,6 +403,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
openSelect() {
|
|
|
|
|
// console.log('=== 3. select 修改 - openSelect ===', this.value)
|
|
|
|
|
if (!this.open) {
|
|
|
|
|
this.getSelectFirst('', false)
|
|
|
|
|
} else {
|
|
|
|
@ -403,9 +411,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectOption() {
|
|
|
|
|
// console.log('=== 4. select 修改 - selectOption ===', this.value)
|
|
|
|
|
this.open = false
|
|
|
|
|
},
|
|
|
|
|
getSelectBlur () {
|
|
|
|
|
getSelectBlur (e) {
|
|
|
|
|
// console.log('=== 5. select 修改 - getSelectBlur ===', e, this.defaultVal, this.value)
|
|
|
|
|
this.open = false
|
|
|
|
|
}
|
|
|
|
|
}
|