小程序开发中,页面自动获取input焦点,测试版正常,但发布到正式环境就失效了?

小程序 文章 2022-03-03 12:20 836 0 全屏看文

AI助手支持GPT4.0

小程序开发中,页面自动获取input焦点,测试版正常,但发布到正式环境就失效了?During the development of the applet, the page automatically obtains the input focus, and the beta version is normal, but it fails when it is released to the official environment?

小程序开发中,页面自动获取input焦点,测试版正常,但发布到正式环境就失效了?

 <input class="weui-inputfocus="{{focus}}value="{{value}}bindinput="scanCode"

      bindblur="inputBlur" />

onReady中,setDada( { focus:true } ) ,体验版能正常获取焦点,发布正式版之后,focus会被置为true,但无法正常获取焦点

< input class = "weui input" focus = "{focus}" value = "{value}}" bindinput = "scancode" bindblue = "inputblur" / > in onready, setdada ({focus: true}), the experience version can get the focus normally. After the official version is released, focus will be set to true, but it cannot get the focus normally

回答:

叫我阿龙吧:

苹果设备有bug,不能自动获取,一直不用这个功能

小黎:

怀疑focus默认值为false。然后setData 写错了

brave:

setData 不是 setDada

-EOF-

AI助手支持GPT4.0