注释掉组件内的setTimeout即可正常弹出输入法
showValue (val) {
this.$emit('input', val)
if (val) {
if (this.showInput) {
this.msg = ''
// setTimeout(() => {
// if (this.$refs.input) {
// console.log('focus')
// this.$refs.input.focus()
// }
// }, 300)
}
this.$emit('on-show') // emit just after msg is cleared
}
非组件问题,iOS 实现不了在 confirm 里主动获取焦点。
焦点的问题在下个将发布的版本修复了。
为什么还是存在这个问题,打开confirm,ios没有自动focus