收藏
回答

input的blur在点击确认按钮的bindtap之前触发

<view class="pd-sm pl-md pr-md radius-15 flex-center" style="width:580rpx;border:1rpx solid #f4f6f8;">
   <input adjust-position="false" bindinput="toSetItem" bindfocus="focus"
     bindblur="blur" class="flex-1" type="text" value="{{tags}}" focus="{{showPopup}}" placeholder="请添加自定义标签"
     maxlength="16" />
   <view class="f-caption c-caption">{{tags.length > 16 ? 16 : tags.length}}/16</view>
</view>
<view class="flex-1 pd-lg" bindtap="toAddTag">确定</view>
点击确认按钮按理说应该执行toAddTag方法,但是执行了绑定的blur方法,catchtap也试过了,也不行
回答关注问题邀请回答
收藏

2 个回答

  • Rua!
    Rua!
    2021-09-18

    点击按钮就失去了对input的焦点了,IOS和安卓有时候呈现方式好像不同,建议换一种写法

    2021-09-18
    有用
    回复
  • 莫奈的有趣灵魂
    莫奈的有趣灵魂
    2021-09-18

    这个问题时好时坏.相同源码.有时候可以有时候不可以

    2021-09-18
    有用
    回复
登录 后发表内容