official-account被隐藏后再打开不显示?有没有解决办法?
初始show为true,触发switch后,隐藏掉official-account;再触发switch时,无法打开official-account
<view wx:if="{{show}}"><official-account bindload="connectSuccess" binderror="connectError"> </official-account></view><button bindtap='switch'>打开/关闭</button> |
console.log('connect success', detail); },connectError(detail) { console.log('connect error', detail); },switch(){ var show=!this.data.show; this.setData({ show:show })} |
第一次打开没问题
点击去关注,打开official-account
不显示official-account
客户那边有这个需求,需要可以关闭这个组件,但当再次触发时需要再打开。有没有人遇到同样的?

用hidden来控制显示或隐藏
再次需扫码 才会载显示![]()