更新主题样式,添加边框颜色变量;优化弹窗背景和标题样式;调整月度数据加载格式;改进图表初始化逻辑
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-tertiary: #71717a;
|
||||
|
||||
/* 边框颜色 */
|
||||
--border-color: #3f3f46;
|
||||
|
||||
/* 强调色 (深色主题调整) */
|
||||
--accent-primary: #FF6B6B;
|
||||
--accent-danger: #f87171;
|
||||
@@ -134,7 +137,10 @@
|
||||
background-color: var(--bg-tertiary);
|
||||
}
|
||||
|
||||
/* 布局容器 */
|
||||
/* 边框颜色 */
|
||||
--border-color: #E5E7EB;
|
||||
|
||||
/* 布局容器 */
|
||||
.container-fluid {
|
||||
width: 100%;
|
||||
max-width: 402px;
|
||||
|
||||
@@ -343,6 +343,7 @@ watch(visible, (newValue) => {
|
||||
padding: var(--spacing-2xl);
|
||||
padding-bottom: var(--spacing-lg);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
@@ -352,6 +353,7 @@ watch(visible, (newValue) => {
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.popup-subtitle {
|
||||
@@ -389,6 +391,7 @@ watch(visible, (newValue) => {
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.txn-card:active {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<template>
|
||||
<van-popup
|
||||
v-model:show="visible"
|
||||
@@ -111,7 +111,7 @@ const hasActions = computed(() => !!slots['header-actions'])
|
||||
.popup-header-fixed {
|
||||
flex-shrink: 0;
|
||||
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);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
@@ -138,10 +138,11 @@ const hasActions = computed(() => !!slots['header-actions'])
|
||||
|
||||
.popup-title {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
color: var(--van-text-color);
|
||||
letter-spacing: -0.02em;
|
||||
/*超出长度*/
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -314,7 +314,15 @@ const loadMonthlyData = async (year, month) => {
|
||||
// 加载每日统计
|
||||
const dailyResult = await getDailyStatistics({ year, month })
|
||||
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) {
|
||||
console.error('加载月度数据失败:', error)
|
||||
|
||||
@@ -108,7 +108,12 @@ const initChart = async () => {
|
||||
await nextTick()
|
||||
|
||||
if (!chartRef.value) {
|
||||
console.warn('图表容器未找到')
|
||||
// 如果容器还未准备好,等待一小段时间后重试
|
||||
setTimeout(() => {
|
||||
if (chartRef.value && !chartInstance) {
|
||||
initChart()
|
||||
}
|
||||
}, 100)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user