我要如何做到,当要分享内容为空时不触发onShareAppMessage: function弹出为空提示呢。有大佬知道怎么解决吗?
button设置open-type="share"点击按钮一定会触发分享吗?能动态设置吗?The button setting open-type="share" will trigger sharing when the button is clicked? Can it be set dynamically?
button设置open-type="share"点击按钮一定会触发分享吗?能动态设置吗?我要如何做到,当要分享内容为空时不触发onShareAppMessage: function弹出为空提示呢。有大佬知道怎么解决吗?
How can I do this without triggering the onshareappmessage: function pop-up empty prompt when the content to be shared is empty. Do any big guys know how to solve it?
回答:
<button wx:if
写2个button
<button openType="share" wx:if="{{shareData}}">share</button>or<button openType="{{shareData ? 'share' : ''}}">share</button>