添加属性:style=“display:contents”
<view class="box">
<button class="button" open-type="share"></button>
</view>
.box{
position:relative;
height:50rpx;
width:50rpx;
}
.button{
position: absolute;
//display: contents;
height: 100%;
width: 100%;
top: 0;
left: 0;
opacity:0;
}