uview-plus组件库全面升级更新,订单结算判断支付方式是否可用代码调整,公众号关注二维码修改
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
<script>
|
||||
import {
|
||||
addUnit,
|
||||
guid
|
||||
guid,
|
||||
rpx2px
|
||||
} from '../../libs/function/index.js';
|
||||
/**
|
||||
* lazyLoad 懒加载
|
||||
@@ -114,7 +115,7 @@
|
||||
// 将threshold从rpx转为px
|
||||
getThreshold() {
|
||||
// 先取绝对值,因为threshold可能是负数,最后根据this.threshold是正数或者负数,重新还原
|
||||
let thresholdPx = uni.upx2px(Math.abs(this.threshold));
|
||||
let thresholdPx = rpx2px(Math.abs(this.threshold));
|
||||
return this.threshold < 0 ? -thresholdPx : thresholdPx;
|
||||
},
|
||||
// 计算图片的高度,可能为auto,带%,或者直接数值
|
||||
@@ -223,6 +224,10 @@
|
||||
if (res.intersectionRatio > 0) {
|
||||
// 懒加载状态改变
|
||||
this.isShow = true;
|
||||
// 图片为空时显示错误
|
||||
if (!this.image) {
|
||||
this.loadError();
|
||||
}
|
||||
// 如果图片已经加载,去掉监听,减少性能的消耗
|
||||
this.disconnectObserver('contentObserver');
|
||||
}
|
||||
@@ -238,8 +243,6 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "../../libs/css/components.scss";
|
||||
|
||||
.u-wrap {
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user