小程序怎样实现input自动聚焦并且自动弹出键盘?

小程序 文章 2020-08-27 10:21 888 0 全屏看文

AI助手支持GPT4.0

小程序怎样实现input自动聚焦并且自动弹出键盘?How does the applet realize automatic input focus and automatic pop-up keyboard?

小程序怎样实现input自动聚焦并且自动弹出键盘?

小程序怎样实现input自动聚焦并且自动弹出键盘?

How to realize input auto focus and pop up keyboard automatically?

回答:

陈宇明:

添加 focus 属性

仙ღ₅₂₀¹³¹⁴:

auto-focus,

用楼上大佬的方式吧。刚看了下文档 废弃了。

Trafalgar Lu:auto-focus 即将废弃了, 用focus了
仙ღ₅₂₀¹³¹⁴:嗯
微喵网络:
<input focus="{{true}}" />
Trafalgar Lu:好了好了,刚刚一直改的是别的页面 ,我说怎么没用

-EOF-

AI助手支持GPT4.0