feat: 订单详情样式调整
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user