收藏
回答

searchBar的search方法无法触发?

wxml
<view wx:if="{{page === 'seas'}}">
    <mp-searchbar bindcancel="searchCancel" bindselectresult="selectResult" search="{{search}}" placeholder="搜索公海客户"></mp-searchbar>
    <view class="publicSea-content" wx:if="{{!searchStatus}}">
      <view wx:for="{{publicSeaCustomerList}}" wx:key="_id" data-index="{{item._id}}" bindtap="selectSalesOrder">
        <a class="publicSea-item">
          <view class="customer-name">{{item.name}}</view>
          <view class="right-arrow">
            <mp-icon icon="arrow" color="#999" size="{{14}}"></mp-icon>
          </view>
        </a>
      </view>
    </view>
</view>
js
  search(value) {
    console.log(value);
  },

search方法完全没有触发是怎么回事

回答关注问题邀请回答
收藏

1 个回答

  • 小声bb
    小声bb
    2021-04-20
    this.setData({
     search: this.search.bind(this)
    })
    

    是我菜了

    2021-04-20
    有用
    回复
登录 后发表内容