refactor: UI/UX 全面重构 — 设计系统统一
设计系统: - uni.scss 扩展:间距/圆角/字体/阴影/动画 token 体系 - 新建 styles/mixins.scss:20+ 公共 mixin 页面重构(12 个页面): - 首页/记账/统计/账单/个人中心/预算/分类管理 - 群组管理/通知中心/管理员/用户管理/编辑资料 所有硬编码替换为设计 token: - 颜色:#FFF8F0→$bg, #FFFFFF→$surface, #FF8C69→$primary 等 - 间距:40rpx→$space-xl, 24rpx→$space-md 等 - 字体:28rpx→$font-lg, 24rpx→$font-md 等 - 圆角:20rpx→$radius-lg, 40rpx→$radius-2xl 等 - 阴影:统一使用 $shadow-md/$shadow-sm 重复样式提取为 mixin: - page-base, sticky-header, nav-bar, card, modal-mask - tabs, tab, state-box, shimmer, flex-center 等
This commit is contained in:
@@ -268,73 +268,66 @@ async function onMigrateConfirm() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/styles/mixins.scss';
|
||||
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background: #FFF8F0;
|
||||
padding: 0 0 180rpx;
|
||||
@include page-base;
|
||||
}
|
||||
|
||||
.header-fixed {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background: #FFF8F0;
|
||||
@include sticky-header;
|
||||
}
|
||||
|
||||
.status-bar { background: #FFF8F0; }
|
||||
.status-bar { @include status-bar; }
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16rpx 40rpx;
|
||||
padding: $space-sm $space-xl;
|
||||
}
|
||||
|
||||
.nav-back {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@include nav-back;
|
||||
border-radius: 50%;
|
||||
|
||||
&:active { background: #F0E0D6; }
|
||||
&:active { background: $border; }
|
||||
}
|
||||
|
||||
.title { font-size: 32rpx; font-weight: 600; color: #2D1B1B; }
|
||||
.title { font-size: $font-xl; font-weight: 600; color: $text; }
|
||||
|
||||
.tabs-wrap { display: flex; justify-content: center; margin: 16rpx 0 32rpx; }
|
||||
.tabs-wrap { display: flex; justify-content: center; margin: $space-sm 0 $space-lg; }
|
||||
|
||||
.tabs {
|
||||
display: inline-flex;
|
||||
background: #FFF0E6;
|
||||
border-radius: 24rpx;
|
||||
padding: 8rpx;
|
||||
background: $surface-warm;
|
||||
border-radius: $space-md;
|
||||
padding: $space-xs;
|
||||
}
|
||||
|
||||
.tab {
|
||||
padding: 16rpx 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #8B7E7E;
|
||||
transition: all 0.2s;
|
||||
padding: $space-sm $space-xl;
|
||||
border-radius: $radius-lg;
|
||||
font-size: $font-lg;
|
||||
color: $text-sec;
|
||||
transition: all $transition-normal;
|
||||
|
||||
&.active {
|
||||
background: #FFFFFF;
|
||||
color: #FF8C69;
|
||||
background: $surface;
|
||||
color: $primary;
|
||||
font-weight: 600;
|
||||
box-shadow: 2rpx 2rpx 8rpx rgba(45, 27, 27, 0.06);
|
||||
box-shadow: $shadow-sm;
|
||||
}
|
||||
}
|
||||
|
||||
.cat-list { padding: 0 40rpx; }
|
||||
.cat-list { padding: 0 $space-xl; }
|
||||
|
||||
.cat-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #F0E0D6;
|
||||
padding: $space-md 0;
|
||||
border-bottom: 1rpx solid $border;
|
||||
|
||||
&:last-child { border-bottom: none; }
|
||||
}
|
||||
@@ -342,26 +335,26 @@ async function onMigrateConfirm() {
|
||||
.cat-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
gap: $space-sm;
|
||||
flex: 1;
|
||||
padding: 8rpx 0;
|
||||
padding: $space-xs 0;
|
||||
|
||||
&:active { opacity: 0.6; }
|
||||
}
|
||||
|
||||
.cat-name { font-size: 28rpx; color: #2D1B1B; font-weight: 500; }
|
||||
.cat-name { font-size: $font-lg; color: $text; font-weight: 500; }
|
||||
|
||||
.cat-badge {
|
||||
font-size: 20rpx;
|
||||
color: #FF8C69;
|
||||
background: #FFE8E0;
|
||||
font-size: $font-xs;
|
||||
color: $primary;
|
||||
background: $primary-light;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
border-radius: $radius-xs;
|
||||
}
|
||||
|
||||
.cat-actions {
|
||||
display: flex;
|
||||
gap: 8rpx;
|
||||
gap: $space-xs;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
@@ -372,16 +365,16 @@ async function onMigrateConfirm() {
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
|
||||
&:active { background: #F0E0D6; }
|
||||
&:active { background: $border; }
|
||||
}
|
||||
|
||||
.fab {
|
||||
position: fixed;
|
||||
right: 40rpx;
|
||||
right: $space-xl;
|
||||
bottom: 120rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
background: linear-gradient(135deg, #FF8C69, #E67355);
|
||||
background: linear-gradient(135deg, $primary, #E67355);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -394,8 +387,8 @@ async function onMigrateConfirm() {
|
||||
|
||||
.color-picker {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
gap: $space-lg;
|
||||
margin-bottom: $space-md;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -404,10 +397,10 @@ async function onMigrateConfirm() {
|
||||
height: 56rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid transparent;
|
||||
transition: all 0.2s;
|
||||
transition: all $transition-normal;
|
||||
|
||||
&.selected {
|
||||
border-color: #2D1B1B;
|
||||
border-color: $text;
|
||||
transform: scale(1.15);
|
||||
}
|
||||
&:active { opacity: 0.7; }
|
||||
@@ -425,87 +418,85 @@ async function onMigrateConfirm() {
|
||||
|
||||
.modal {
|
||||
width: 600rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx;
|
||||
padding: 48rpx;
|
||||
background: $surface;
|
||||
border-radius: $space-lg;
|
||||
padding: $space-2xl;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
font-size: 32rpx;
|
||||
font-size: $font-xl;
|
||||
font-weight: 600;
|
||||
color: #2D1B1B;
|
||||
color: $text;
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-bottom: 32rpx;
|
||||
margin-bottom: $space-lg;
|
||||
}
|
||||
|
||||
.modal-desc {
|
||||
font-size: 28rpx;
|
||||
color: #8B7E7E;
|
||||
font-size: $font-lg;
|
||||
color: $text-sec;
|
||||
display: block;
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: $space-md;
|
||||
}
|
||||
|
||||
.modal-input {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
background: #FFF8F0;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 32rpx;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-sizing: border-box;
|
||||
background: $bg;
|
||||
border-radius: $space-md;
|
||||
padding: 0 $space-lg;
|
||||
font-size: $font-lg;
|
||||
margin-bottom: $space-md;
|
||||
}
|
||||
|
||||
.migrate-list {
|
||||
max-height: 400rpx;
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: $space-md;
|
||||
}
|
||||
|
||||
.migrate-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding: 20rpx 16rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 8rpx;
|
||||
transition: background 0.2s;
|
||||
gap: $space-sm;
|
||||
padding: $space-lg $space-sm;
|
||||
border-radius: $radius-md;
|
||||
margin-bottom: $space-xs;
|
||||
transition: background $transition-normal;
|
||||
|
||||
&.selected {
|
||||
background: #FFE8E0;
|
||||
background: $primary-light;
|
||||
}
|
||||
&:active { background: #FFF0E6; }
|
||||
&:active { background: $surface-warm; }
|
||||
}
|
||||
|
||||
.migrate-name {
|
||||
font-size: 28rpx;
|
||||
color: #2D1B1B;
|
||||
font-size: $font-lg;
|
||||
color: $text;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.modal-btns {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
gap: $space-md;
|
||||
}
|
||||
|
||||
.modal-btn {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
border-radius: 24rpx;
|
||||
border-radius: $space-md;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
font-size: $font-lg;
|
||||
font-weight: 600;
|
||||
|
||||
&.cancel {
|
||||
background: #FFF8F0;
|
||||
color: #8B7E7E;
|
||||
background: $bg;
|
||||
color: $text-sec;
|
||||
}
|
||||
|
||||
&.confirm {
|
||||
background: linear-gradient(135deg, #FF8C69, #E67355);
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(135deg, $primary, #E67355);
|
||||
color: $surface;
|
||||
}
|
||||
|
||||
&.disabled { opacity: 0.5; }
|
||||
|
||||
Reference in New Issue
Block a user