fix: navbar commpontents

This commit is contained in:
zzc
2026-01-31 23:31:40 +08:00
parent 4f4a7792cb
commit 6f08363701
11 changed files with 33 additions and 477 deletions

View File

@@ -1,17 +1,6 @@
<template>
<view class="greeting-page" :style="{ paddingTop: navBarTop + 'px' }">
<!-- Navbar -->
<view
class="nav-bar"
:style="{ height: navBarHeight + 'px', paddingTop: navBarTop + 'px' }"
>
<view class="nav-content">
<view class="back-btn" @tap="goBack">
<text class="back-arrow"></text>
</view>
<text class="title">我的新春祝福</text>
</view>
</view>
<view class="greeting-page" >
<NavBar title="我的祝福" />
<!-- Header Stats -->
<view class="header-stats">
@@ -111,7 +100,7 @@
import { ref, onMounted } from "vue";
import { onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
import { getMyCard } from "@/api/mine.js";
import { getBavBarHeight } from "@/utils/system";
import NavBar from "@/components/NavBar/NavBar.vue";
const navBarTop = ref(0);
const navBarHeight = ref(44);
@@ -190,8 +179,6 @@ const onTouchEnd = (e, item) => {
};
onMounted(() => {
const sysInfo = uni.getSystemInfoSync();
navBarTop.value = sysInfo.statusBarHeight;
fetchList(true);
});
@@ -298,47 +285,6 @@ const onEdit = (item) => {
box-sizing: border-box;
}
.nav-bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 100;
background-color: #f9f9f9;
.nav-content {
height: 44px;
display: flex;
align-items: center;
padding: 0 24rpx;
.back-btn {
display: flex;
align-items: center;
margin-right: 24rpx;
/* 增大点击区域 */
padding: 20rpx;
margin-left: -20rpx;
.back-arrow {
font-size: 50rpx;
color: #333;
font-weight: 300;
line-height: 1;
}
}
.title {
font-size: 18px;
font-weight: 600;
color: #333;
flex: 1;
text-align: center;
margin-right: 50rpx; /* Balance back button */
}
}
}
.header-stats {
padding: 20px;
background: #f9f9f9;