样式统一
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="statistics-container">
|
||||
<div class="page-container">
|
||||
<!-- 顶部导航栏 -->
|
||||
<van-nav-bar title="账单统计" placeholder>
|
||||
<template #right>
|
||||
@@ -61,9 +61,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 分类统计 -->
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<h3 class="stat-title">支出分类统计</h3>
|
||||
<div class="common-card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">支出分类统计</h3>
|
||||
<van-tag type="primary" size="medium">{{ expenseCategories.length }}类</van-tag>
|
||||
</div>
|
||||
|
||||
@@ -119,9 +119,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 收入分类统计 -->
|
||||
<div class="stat-card" v-if="incomeCategories.length > 0">
|
||||
<div class="stat-header">
|
||||
<h3 class="stat-title">收入分类统计</h3>
|
||||
<div class="common-card" v-if="incomeCategories.length > 0">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">收入分类统计</h3>
|
||||
<van-tag type="success" size="medium">{{ incomeCategories.length }}类</van-tag>
|
||||
</div>
|
||||
|
||||
@@ -144,9 +144,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 趋势统计 -->
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<h3 class="stat-title">近6个月趋势</h3>
|
||||
<div class="common-card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">近6个月趋势</h3>
|
||||
</div>
|
||||
|
||||
<div class="trend-chart">
|
||||
@@ -192,9 +192,9 @@
|
||||
</div>
|
||||
|
||||
<!-- 其他统计 -->
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<h3 class="stat-title">其他统计</h3>
|
||||
<div class="common-card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">其他统计</h3>
|
||||
</div>
|
||||
|
||||
<div class="other-stats">
|
||||
@@ -503,12 +503,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.statistics-container {
|
||||
min-height: 100vh;
|
||||
background: var(--van-background-2);
|
||||
padding-bottom: env(safe-area-inset-bottom, 0px);
|
||||
}
|
||||
|
||||
.statistics-content {
|
||||
padding: 16px 0 0 0;
|
||||
}
|
||||
@@ -520,11 +514,17 @@ onMounted(() => {
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
margin: 0 12px 16px;
|
||||
background: var(--van-background);
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.month-selector {
|
||||
background: #1f1f1f;
|
||||
}
|
||||
}
|
||||
|
||||
.month-text {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
@@ -541,12 +541,19 @@ onMounted(() => {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
background: var(--van-background);
|
||||
background: #ffffff;
|
||||
margin: 0 12px 16px;
|
||||
padding: 24px 12px;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
border: 1px solid var(--van-border-color);
|
||||
border: 1px solid #ebedf0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.overview-card {
|
||||
background: #1f1f1f;
|
||||
border-color: #2c2c2c;
|
||||
}
|
||||
}
|
||||
|
||||
.overview-item {
|
||||
@@ -585,30 +592,6 @@ onMounted(() => {
|
||||
color: #51cf66;
|
||||
}
|
||||
|
||||
/* 统计卡片 */
|
||||
.stat-card {
|
||||
background: var(--van-background);
|
||||
margin: 0 12px 16px;
|
||||
padding: 16px;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||||
border: 1px solid var(--van-border-color);
|
||||
}
|
||||
|
||||
.stat-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.stat-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--van-text-color);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 环形图 */
|
||||
.chart-container {
|
||||
padding: 20px;
|
||||
@@ -653,7 +636,7 @@ onMounted(() => {
|
||||
|
||||
/* 分类列表 */
|
||||
.category-list {
|
||||
padding: 12px 16px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.category-item {
|
||||
@@ -661,7 +644,13 @@ onMounted(() => {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--van-border-color);
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.category-item {
|
||||
border-bottom: 1px solid #2c2c2c;
|
||||
}
|
||||
}
|
||||
|
||||
.category-item:last-child {
|
||||
@@ -701,11 +690,17 @@ onMounted(() => {
|
||||
.category-percent {
|
||||
font-size: 12px;
|
||||
color: var(--van-text-color-3);
|
||||
background: var(--van-background-2);
|
||||
background: #f7f8fa;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.category-percent {
|
||||
background: #141414;
|
||||
}
|
||||
}
|
||||
|
||||
.income-color {
|
||||
background-color: #51cf66;
|
||||
}
|
||||
@@ -787,7 +782,13 @@ onMounted(() => {
|
||||
justify-content: center;
|
||||
gap: 24px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid var(--van-border-color);
|
||||
border-top: 1px solid #ebedf0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.trend-legend {
|
||||
border-top: 1px solid #2c2c2c;
|
||||
}
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
@@ -813,12 +814,18 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
background: var(--van-background-2);
|
||||
background: #f7f8fa;
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.stat-item {
|
||||
background: #141414;
|
||||
}
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 13px;
|
||||
color: var(--van-text-color-2);
|
||||
|
||||
Reference in New Issue
Block a user