feat: 订单详情样式调整

This commit is contained in:
duanshuwen
2025-10-28 20:57:46 +08:00
parent 1f3a3c052a
commit 89cf4f81cd
8 changed files with 18 additions and 60 deletions

View File

@@ -3,14 +3,10 @@
<TopNavBar
titleAlign="center"
:backgroundColor="backgroundColor"
:backIconColor="backIconColor"
:shadow="shadow"
title="订单详情"
fixed
>
<template #title>
{{ title }}
</template>
</TopNavBar>
/>
<view class="order-detail-wrapper">
<OrderStatusInfo :orderData="orderData" />
@@ -66,20 +62,16 @@ const getOrderDetail = async (orderId) => {
// 监听页面滚动事件
const backgroundColor = ref("transparent");
const backIconColor = ref("#fff");
const title = ref("");
const shadow = ref(false);
onPageScroll(({ scrollTop }) => {
console.log("🚀 ~ scrollTop:", scrollTop);
// 当滚动到顶部时,显示返回按钮
if (scrollTop <= 0) {
backgroundColor.value = "transparent";
backIconColor.value = "#fff";
title.value = "";
shadow.value = false;
} else {
backgroundColor.value = "#ffffff";
backIconColor.value = "#333333";
title.value = "订单详情";
shadow.value = true;
}
});