From 11aa958077e3f70e61c3284dd0429f4f18889a19 Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Thu, 16 Oct 2025 20:29:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=88=91=E7=9A=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/components/TopNavBar/index.vue | 39 ++++--- src/components/TopNavBar/styles/index.scss | 109 ++++-------------- .../order/components/OrderCard/InfoRow.vue | 27 +---- .../components/OrderCard/OrderCardContent.vue | 23 +++- .../order/components/OrderCard/index.vue | 50 ++++---- .../components/OrderCard/styles/index.scss | 52 +-------- src/pages-order/order/list.vue | 43 +------ .../components/module/MoreService/index.vue | 16 ++- src/static/scss/margin.scss | 20 ++++ src/static/scss/padding.scss | 8 ++ 11 files changed, 143 insertions(+), 246 deletions(-) diff --git a/src/App.vue b/src/App.vue index a24b9b1..1f40c70 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,7 +23,7 @@ page, body, #app { font-family: PingFang SC, PingFang SC; - background-color: #e9f3f7; + background-color: #f5f7fa; height: 100vh; width: 100vw; } diff --git a/src/components/TopNavBar/index.vue b/src/components/TopNavBar/index.vue index a6dc28d..a050825 100644 --- a/src/components/TopNavBar/index.vue +++ b/src/components/TopNavBar/index.vue @@ -7,18 +7,33 @@ > - + - + - + - {{ - title - }} + + {{ title }} + @@ -45,11 +60,6 @@ const props = defineProps({ type: Boolean, default: false, }, - // 是否添加阴影 - shadow: { - type: Boolean, - default: true, - }, // 是否显示返回按钮 showBack: { type: Boolean, @@ -58,17 +68,17 @@ const props = defineProps({ // 背景颜色 backgroundColor: { type: String, - default: "#ffffff", + default: "#d9eeff", }, // 标题颜色 titleColor: { type: String, - default: "#333333", + default: "#000", }, // 返回按钮图标颜色 backIconColor: { type: String, - default: "#333333", + default: "#000", }, // 是否隐藏状态栏占位 hideStatusBar: { @@ -114,7 +124,6 @@ const navBarClass = computed(() => { "top-nav-bar", { "top-nav-bar--fixed": props.fixed, - "has-shadow": props.shadow, }, ]; }); diff --git a/src/components/TopNavBar/styles/index.scss b/src/components/TopNavBar/styles/index.scss index 7a7bd7e..12402c2 100644 --- a/src/components/TopNavBar/styles/index.scss +++ b/src/components/TopNavBar/styles/index.scss @@ -1,11 +1,7 @@ // TopNavBar 组件样式 .top-nav-bar { width: 100%; - background-color: $uni-bg-color; - - &.has-shadow { - box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1); - } + background-color: #d9eeff; &--fixed { position: fixed; @@ -14,86 +10,35 @@ right: 0; z-index: 999; } +} - .nav-bar-content { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 16px; - position: relative; +.nav-bar-left, +.nav-bar-right { + width: 30px; + height: 30px; +} - .nav-bar-left { - display: flex; - align-items: center; - justify-content: center; - width: 30px; - height: 30px; - position: absolute; - left: 8px; - top: 50%; - transform: translateY(-50%); - z-index: 2; - cursor: pointer; - transition: opacity 0.2s ease; +.nav-bar-center { + flex: 1; + height: 30px; + padding: 0 20px; // 为左右按钮留出空间 - &:hover { - opacity: 0.7; - } + // 居中对齐(默认) + &--center { + justify-content: center; - &:active { - opacity: 0.5; - } + .nav-bar-title { + text-align: center; } + } - .nav-bar-center { - flex: 1; - height: 30px; - display: flex; - align-items: center; - justify-content: center; - padding: 0 20px; // 为左右按钮留出空间 + // 左对齐 + &--left { + justify-content: flex-start; + padding-left: 20px; // 为返回按钮留出更多空间 - // 居中对齐(默认) - &--center { - justify-content: center; - - .nav-bar-title { - text-align: center; - } - } - - // 左对齐 - &--left { - justify-content: flex-start; - padding-left: 20px; // 为返回按钮留出更多空间 - - .nav-bar-title { - text-align: left; - } - } - - .nav-bar-title { - font-size: 18px; - font-weight: 500; - color: $uni-text-color; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - line-height: 1.4; - } - } - - .nav-bar-right { - display: flex; - align-items: center; - justify-content: center; - min-width: 30px; - height: 30px; - position: absolute; - right: 8px; - top: 50%; - transform: translateY(-50%); - z-index: 2; + .nav-bar-title { + text-align: left; } } } @@ -102,11 +47,3 @@ .page-with-fixed-navbar { padding-top: calc(var(--status-bar-height, 44px) + 44px); } - -// 安全区域适配 -.top-nav-bar { - padding-left: constant(safe-area-inset-left); - padding-left: env(safe-area-inset-left); - padding-right: constant(safe-area-inset-right); - padding-right: env(safe-area-inset-right); -} diff --git a/src/pages-order/order/components/OrderCard/InfoRow.vue b/src/pages-order/order/components/OrderCard/InfoRow.vue index 2f650e8..831a918 100644 --- a/src/pages-order/order/components/OrderCard/InfoRow.vue +++ b/src/pages-order/order/components/OrderCard/InfoRow.vue @@ -1,7 +1,7 @@ @@ -23,23 +23,4 @@ const props = defineProps({ }); - + diff --git a/src/pages-order/order/components/OrderCard/OrderCardContent.vue b/src/pages-order/order/components/OrderCard/OrderCardContent.vue index 7c8dfd7..52c7df6 100644 --- a/src/pages-order/order/components/OrderCard/OrderCardContent.vue +++ b/src/pages-order/order/components/OrderCard/OrderCardContent.vue @@ -1,5 +1,15 @@