uview-plus组件库全面升级更新,订单结算判断支付方式是否可用代码调整,公众号关注二维码修改

This commit is contained in:
2025-10-21 10:44:31 +08:00
parent 5d98b7efc2
commit 5f3a307fec
395 changed files with 31264 additions and 2477 deletions

View File

@@ -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;