更新主题样式,添加边框颜色变量;优化弹窗背景和标题样式;调整月度数据加载格式;改进图表初始化逻辑
Some checks failed
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
Docker Build & Deploy / Cleanup Dangling Images (push) Has been cancelled
Docker Build & Deploy / WeChat Notification (push) Has been cancelled
Docker Build & Deploy / Build Docker Image (push) Has been cancelled
Some checks failed
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
Docker Build & Deploy / Cleanup Dangling Images (push) Has been cancelled
Docker Build & Deploy / WeChat Notification (push) Has been cancelled
Docker Build & Deploy / Build Docker Image (push) Has been cancelled
This commit is contained in:
@@ -87,6 +87,9 @@
|
|||||||
--text-secondary: #a1a1aa;
|
--text-secondary: #a1a1aa;
|
||||||
--text-tertiary: #71717a;
|
--text-tertiary: #71717a;
|
||||||
|
|
||||||
|
/* 边框颜色 */
|
||||||
|
--border-color: #3f3f46;
|
||||||
|
|
||||||
/* 强调色 (深色主题调整) */
|
/* 强调色 (深色主题调整) */
|
||||||
--accent-primary: #FF6B6B;
|
--accent-primary: #FF6B6B;
|
||||||
--accent-danger: #f87171;
|
--accent-danger: #f87171;
|
||||||
@@ -134,6 +137,9 @@
|
|||||||
background-color: var(--bg-tertiary);
|
background-color: var(--bg-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 边框颜色 */
|
||||||
|
--border-color: #E5E7EB;
|
||||||
|
|
||||||
/* 布局容器 */
|
/* 布局容器 */
|
||||||
.container-fluid {
|
.container-fluid {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ watch(visible, (newValue) => {
|
|||||||
padding: var(--spacing-2xl);
|
padding: var(--spacing-2xl);
|
||||||
padding-bottom: var(--spacing-lg);
|
padding-bottom: var(--spacing-lg);
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
|
background: var(--bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-title {
|
.popup-title {
|
||||||
@@ -352,6 +353,7 @@ watch(visible, (newValue) => {
|
|||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-subtitle {
|
.popup-subtitle {
|
||||||
@@ -389,6 +391,7 @@ watch(visible, (newValue) => {
|
|||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: opacity 0.2s;
|
transition: opacity 0.2s;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.txn-card:active {
|
.txn-card:active {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- eslint-disable vue/no-v-html -->
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<template>
|
<template>
|
||||||
<van-popup
|
<van-popup
|
||||||
v-model:show="visible"
|
v-model:show="visible"
|
||||||
@@ -111,7 +111,7 @@ const hasActions = computed(() => !!slots['header-actions'])
|
|||||||
.popup-header-fixed {
|
.popup-header-fixed {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
background-color: var(--van-background-2);
|
background: linear-gradient(180deg, var(--van-background) 0%, var(--van-background-2) 100%);
|
||||||
border-bottom: 1px solid var(--van-border-color);
|
border-bottom: 1px solid var(--van-border-color);
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -138,10 +138,11 @@ const hasActions = computed(() => !!slots['header-actions'])
|
|||||||
|
|
||||||
.popup-title {
|
.popup-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--van-text-color);
|
color: var(--van-text-color);
|
||||||
|
letter-spacing: -0.02em;
|
||||||
/*超出长度*/
|
/*超出长度*/
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
@@ -314,7 +314,15 @@ const loadMonthlyData = async (year, month) => {
|
|||||||
// 加载每日统计
|
// 加载每日统计
|
||||||
const dailyResult = await getDailyStatistics({ year, month })
|
const dailyResult = await getDailyStatistics({ year, month })
|
||||||
if (dailyResult?.success && dailyResult.data) {
|
if (dailyResult?.success && dailyResult.data) {
|
||||||
trendStats.value = dailyResult.data.filter(item => item != null)
|
// 转换数据格式:添加完整的 date 字段
|
||||||
|
trendStats.value = dailyResult.data
|
||||||
|
.filter(item => item != null)
|
||||||
|
.map(item => ({
|
||||||
|
date: `${year}-${month.toString().padStart(2, '0')}-${item.day.toString().padStart(2, '0')}`,
|
||||||
|
expense: item.expense || 0,
|
||||||
|
income: item.income || 0,
|
||||||
|
count: item.count || 0
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('加载月度数据失败:', error)
|
console.error('加载月度数据失败:', error)
|
||||||
|
|||||||
@@ -108,7 +108,12 @@ const initChart = async () => {
|
|||||||
await nextTick()
|
await nextTick()
|
||||||
|
|
||||||
if (!chartRef.value) {
|
if (!chartRef.value) {
|
||||||
console.warn('图表容器未找到')
|
// 如果容器还未准备好,等待一小段时间后重试
|
||||||
|
setTimeout(() => {
|
||||||
|
if (chartRef.value && !chartInstance) {
|
||||||
|
initChart()
|
||||||
|
}
|
||||||
|
}, 100)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user