自定义组件中的input focus无效?

发布于 8 年前作者 taohan12998 次浏览最后编辑 8 年前来自 issues

<input type=“text” focus=“{{true}}”></input>

自定义组件中的input,这么写没有聚焦效果?

父级标签有<wx:if>,不知道有没有影响。。。

1 回复
xyang
xyang1 楼6 年前

父标签是 wx:if,input的focus写死true,应该变成wx:if变成true的时候就聚焦了