小程序button改写禁用样式
// !important 要加
<button class="btn" :disabled="disabled"></button>
.btn[disabled]{
color: #fff !important;
background: #434343 !important;
}
接口返回的字符串含有\n,小程序text组件不能换行
手动处理字符串以\n分割,
// text='你好\n 再见'
<view v-for="(item,index) in tipTxt" :key="index">{{item}}</view>
this.tipTxt = text.split("\\n")
swiper-item
上面直接加事件不触发,需要包一层view
使用border和图片之间有间隙,
解决方法:div一个完整的圆,图片居中显示
微信支付宝小程序都不支持 /deep/选择器
小程序弹窗禁止背景滚动。注:支付宝无法禁止背景滚动
// @touchmove.stop.prevent @catchtouchmove catchtouchmove="true"都可以
<view class="dialog-common-box" v-if="isShow" @touchmove.stop.prevent @catchtouchmove>
<view class="dialog-common-body">
// 弹窗内容
</view>
</view>