用hidden切换地图和列表,scroll-view列表的下拉刷新失效。
<!-- 正常 -->
<!-- <view class="content" wx:if="{{type == 'list'}}">
<scroll-view scroll-y="true" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}"
bindrefresherrefresh="refresh" >
.......
</scroll-view>
<!-- ---------------------------------------------------------------------------------------- -->
<!-- 失效 -->
<view class="content" hidden="{{type == 'list'? false: true}}">
<scroll-view scroll-y="true" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}"
bindrefresherrefresh="refresh">
.......
</scroll-view>
</view>
动态绑定refresher-enabled的值,就是切换的时候刷新一下refresher-enabled的值,可以与hidden的值相反,如题主的refresher-enabled="{{type !== 'list'}}"
同样遇到这样的BUG, 希望官方早日修复
https://developers.weixin.qq.com/s/YsO3hLmH7nfX
wx-if试下?