mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-10 19:08:52 +08:00
refactor: 优化购物车与订单页面逻辑
- 更新购物车页面,增强商品展示与交互体验。 - 调整订单页面的状态反馈与用户操作逻辑,确保信息清晰。 - 改进组件样式与布局,提升整体用户体验。 - 修复多个页面中的样式与功能问题,确保一致性与流畅性。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/node_modules/uview-plus/components/u-image/u-image.vue b/node_modules/uview-plus/components/u-image/u-image.vue
|
||||
index 24e3b10..b59b657 100644
|
||||
index 24e3b10..1360704 100644
|
||||
--- a/node_modules/uview-plus/components/u-image/u-image.vue
|
||||
+++ b/node_modules/uview-plus/components/u-image/u-image.vue
|
||||
@@ -26,7 +26,7 @@
|
||||
@@ -20,20 +20,7 @@ index 24e3b10..b59b657 100644
|
||||
class="u-image__error"
|
||||
:style="{
|
||||
borderRadius: shape == 'circle' ? '50%' : addUnit(radius),
|
||||
@@ -108,7 +108,12 @@
|
||||
// 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
|
||||
backgroundStyle: {},
|
||||
// 用于fade模式的控制组件显示与否
|
||||
+ // #ifdef MP-WEIXIN
|
||||
+ show: true
|
||||
+ // #endif
|
||||
+ // #ifndef MP-WEIXIN
|
||||
show: false
|
||||
+ // #endif
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -126,6 +131,12 @@
|
||||
@@ -126,6 +126,12 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -46,6 +33,39 @@ index 24e3b10..b59b657 100644
|
||||
transStyle() {
|
||||
let style = {};
|
||||
// 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位
|
||||
diff --git a/node_modules/uview-plus/components/u-modal/props.js b/node_modules/uview-plus/components/u-modal/props.js
|
||||
index 0f0177b..1aacecf 100644
|
||||
--- a/node_modules/uview-plus/components/u-modal/props.js
|
||||
+++ b/node_modules/uview-plus/components/u-modal/props.js
|
||||
@@ -105,7 +105,7 @@ export const props = defineMixin({
|
||||
// 内容样式
|
||||
contentStyle: {
|
||||
type: Object,
|
||||
- default: () => defProps.modal.contentStyle
|
||||
+ default: () => ({ ...(defProps.modal.contentStyle || {}) })
|
||||
}
|
||||
}
|
||||
})
|
||||
diff --git a/node_modules/uview-plus/components/u-modal/u-modal.vue b/node_modules/uview-plus/components/u-modal/u-modal.vue
|
||||
index eab8f72..bfd3da0 100644
|
||||
--- a/node_modules/uview-plus/components/u-modal/u-modal.vue
|
||||
+++ b/node_modules/uview-plus/components/u-modal/u-modal.vue
|
||||
@@ -142,9 +142,12 @@
|
||||
emits: ["confirm", "cancel", "close", "update:show", 'cancelOnAsync'],
|
||||
computed: {
|
||||
contentStyleCpu() {
|
||||
- let style = this.contentStyle;
|
||||
- style.paddingTop = `${this.title ? 12 : 25}px`
|
||||
- return style;
|
||||
+ // 不要改 props 上的 contentStyle。那个对象是默认配置里的共享引用,
|
||||
+ // 渲染时写入会反向触发父组件更新,购物车页会因此无限循环。
|
||||
+ return {
|
||||
+ ...(this.contentStyle || {}),
|
||||
+ paddingTop: `${this.title ? 12 : 25}px`
|
||||
+ }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
diff --git a/node_modules/uview-plus/components/u-navbar/theme-vars.scss b/node_modules/uview-plus/components/u-navbar/theme-vars.scss
|
||||
index d057ee6..791a092 100644
|
||||
--- a/node_modules/uview-plus/components/u-navbar/theme-vars.scss
|
||||
|
||||
Reference in New Issue
Block a user