fix(select): focus related problem

This commit is contained in:
07akioni 2019-11-14 11:04:19 +08:00
parent 34f78b75e8
commit 7b7ed21ac5
3 changed files with 14 additions and 13 deletions

View File

@ -296,11 +296,11 @@ export default {
},
handleClick () {
this.$emit('click')
this.$nextTick().then(() => {
if (this.filterable) {
this.focusPatternInput()
}
})
// this.$nextTick().then(() => {
// if (this.filterable) {
// this.focusPatternInput()
// }
// })
},
handleDeleteOption (option) {
this.$emit('delete-option', option)
@ -323,11 +323,9 @@ export default {
}
},
handlePatternInputFocus (e) {
// console.log('handlePatternInputFocus')
this.patternInputFocused = true
},
handlePatternInputBlur (e) {
// console.log('handlePatternInputBlur')
this.patternInputFocused = false
this.handleBlur()
},
@ -337,14 +335,15 @@ export default {
}
},
focusPatternInput () {
if (this.$refs.patternInput) {
// console.log('focusPatternInput')
this.$refs.patternInput.focus()
}
// if set to sync it won't work when mode is multiple filterable
this.$nextTick().then(() => {
if (this.$refs.patternInput) {
this.$refs.patternInput.focus()
}
})
},
blurPatternInput () {
if (this.$refs.patternInput) {
// console.log('blurPatternInput')
this.$refs.patternInput.blur()
}
}

View File

@ -291,7 +291,7 @@ export default {
},
handlePickerBlur () {
this.$emit('blur', this.value)
// this.closeMenu()
this.closeMenu()
},
handleClickOutsideMenu (e) {
if (this.active) {

View File

@ -48,6 +48,8 @@ popover 可能 activator 和 content 不同步,在 beforeRouteEnter locale cha
confirm 有 bug = =...和 button 颜色相关,之后检查吧
## 2019.10.21
Radio Button 默认主题下是否 hollow out这是个问题
## 2019.11.14
base picker focus 问题
## TODO
issue fix, add delay prop
add trigger to tooltip