<text class="feed_content top_5" data-id="{{item.userInfo.userId}}" data-name="{{item.userInfo.nickname}}" catchtap="replyContent">{{item.content}}</text>
<view class="row feed_comment_container center_h">
<input class="feed_comment_input" value="{{content}}" bindblur="loseFocus" focus="{{focus}}" bindinput="bindContent" placeholder-class="feed_comment_placeholder" placeholder="写点评论吧......" />
<view class="row center feed_comment_button" catchtap="createContent">
<text class="feed_comment_button_text">发送</text>
</view>
</view>
replyContent(e) {
let replyUserId = e.currentTarget.dataset.id;
let replyNickName = e.currentTarget.dataset.name;
console.log(replyUserId+'---->'+replyNickName)
this.setData({
focus:true,
replyUserId,
replyNickName})
}
走replyContent方法后,设置focus为true,并没有获取焦点,刚进来的时候,设置为true 也没有自动获取焦点,是我写的有问题么?
请各位大佬指点
input的某一级父标签 wx:if隐藏过吗
我把wxml抽出来一级,忘了把值传过去了
emm....这就....很尴尬了