微信小程序 點擊分享之類的按鈕,會向上穿透
官方文檔說:hover-stop-propagation 指定是否阻止本節點的祖先節點出現點擊態

但是在 button 中,不管是否寫 hover-stop-propagation='true' 或者 hover-stop-propagation='{{ true }}',都無法阻止祖先節點穿透,
所以,需要在 button 外部加個阻止穿透的節點view:
<view catchtap='shareBtn'> <button plain="true" open-type="share" class="shareBtn" data-title="{{ item.a_shortTitle }}" data-abstract="{{ item.a_abstract }}" data-image="{{ item.a_picBig }}" hover-stop-propagation="{{true}}"> <image class="shareImg" src="../../../images/shareImg.png" mode="aspectFill" /> </button> </view>

浙公網安備 33010602011771號