I originally set it like this, but it couldn't be displayed normally on the mobile phone. After debugging on the real machine, I adjusted the style.
<cover-view class="btns">
<button class="btn" bindtap="addCartSureBtn">确定</button>
<button class="btn" bindtap="hideModel">取消</button>
</cover-view>
.btns .btn {
width: 190rpx !important;//设置最高级也无效
}
Modify as follows:
.btns .btn {
width: 190rpx;
}
.btns .wx-button-cover-view-inner,
.btns .wx-button-cover-view-wrapper {
width: 100%;
padding: 0;
}