优化样式

This commit is contained in:
zhouyanli
2026-08-17 09:51:52 +08:00
parent ff0d5b0c25
commit 4c894dd184
3 changed files with 29 additions and 56 deletions

View File

@@ -1,17 +1,8 @@
<template>
<view class="setting-container">
<!-- <view class="status_bar"></view> -->
<!-- 顶部导航栏 -->
<!-- <view class="nav-bar">
<view class="nav-left" @tap="goBack">
<uni-icons type="left" size="22" color="#000"></uni-icons>
</view>
<view class="nav-title">设置</view>
<view class="nav-right"></view>
</view> -->
<!-- 内容区域 -->
<scroll-view class="content" scroll-y="true">
<view class="content">
<!-- 手机号设置项 -->
<view class="setting-item" @tap="goToChangePhone">
<view class="item-label">手机号</view>
@@ -31,9 +22,12 @@
<!-- <view class="item-value">{{ }}</view> -->
<uni-icons type="arrowright" size="20" color="#ccc"></uni-icons>
</view>
</scroll-view>
</view>
<!-- 退出登录按钮 -->
<!-- 底部占位,避免内容被固定按钮遮挡 -->
<view class="placeholder"></view>
<!-- 退出登录按钮(固定底部) -->
<view class="logout-btn-wrap">
<button class="logout-btn" @tap="handleLogout">退出登录</button>
</view>
@@ -144,52 +138,19 @@ const confirmLogout = () => {
.setting-container {
min-height: 100vh;
background-color: #ffffff;
display: flex;
flex-direction: column;
}
.status_bar {
width: 100%;
height: 46px;
}
/* 导航栏样式 */
.nav-bar {
height: 44px;
display: flex;
align-items: center;
padding: 0 15px;
border-bottom: 1px solid #f0f0f0;
background-color: #fff;
position: sticky;
top: 0;
z-index: 99;
}
.nav-left {
width: 40px;
height: 44px;
display: flex;
align-items: center;
justify-content: flex-start;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.nav-right {
width: 40px;
box-sizing: border-box;
}
/* 内容区域 */
.content {
flex: 1;
padding: 0;
}
/* 底部占位,高度与固定按钮区一致 */
.placeholder {
height: 104px;
}
/* 设置项样式 */
.setting-item {
display: flex;
@@ -218,7 +179,12 @@ const confirmLogout = () => {
/* 退出登录按钮 */
.logout-btn-wrap {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 30px 15px;
background-color: #ffffff;
}
.logout-btn {