在input框加autofocus=“autofocus”,发现有时好用,有时会闪现一下又消失,然后在mounted里加入一句代码,貌似好了
// 进入页面调起键盘
this.$nextTick(() => {
this.$refs.serachInput.focus()
})
在input框加autofocus=“autofocus”,发现有时好用,有时会闪现一下又消失,然后在mounted里加入一句代码,貌似好了
// 进入页面调起键盘
this.$nextTick(() => {
this.$refs.serachInput.focus()
})