This commit is contained in:
SunCheng
2026-02-15 10:10:28 +08:00
parent e51a3edd50
commit a88556c784
92 changed files with 6751 additions and 776 deletions

View File

@@ -2,7 +2,7 @@
<!-- 支出分类统计 -->
<div
class="common-card"
style="padding-bottom: 10px;"
style="padding-bottom: 10px"
>
<div class="card-header">
<h3 class="card-title">
@@ -255,11 +255,15 @@ const renderPieChart = () => {
}
// 监听数据变化重新渲染图表
watch(() => [props.categories, props.totalExpense, props.colors], () => {
nextTick(() => {
renderPieChart()
})
}, { deep: true, immediate: true })
watch(
() => [props.categories, props.totalExpense, props.colors],
() => {
nextTick(() => {
renderPieChart()
})
},
{ deep: true, immediate: true }
)
// 组件销毁时清理图表实例
onBeforeUnmount(() => {
@@ -404,4 +408,4 @@ onBeforeUnmount(() => {
padding: 2px 8px;
border-radius: 10px;
}
</style>
</style>