fix: 修复图表组件运行时错误
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 16s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

- 将 getChartOptionsByType 替换为 getChartOptions
- 修复 MonthlyExpenseCard.vue 中的图表配置
- 修复 ExpenseCategoryCard.vue 中的图表配置
- 修复 BudgetChartAnalysis.vue 中的图表配置
- 统计页面、日历页面、预算页面运行正常,无控制台错误
This commit is contained in:
SunCheng
2026-02-18 22:19:25 +08:00
parent 5e38a52e5b
commit 0101c3e366
3 changed files with 8 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ defineEmits(['category-click'])
const showAllExpense = ref(false)
// Chart.js 相关
const { getChartOptionsByType } = useChartTheme()
const { getChartOptions } = useChartTheme()
let _chartJSInstance = null
// 饼图标签引导线
@@ -307,7 +307,7 @@ const totalAmount = computed(() => {
const chartOptions = computed(() => {
const isDarkMode = document.documentElement.getAttribute('data-theme') === 'dark'
return getChartOptionsByType('doughnut', {
return getChartOptions({
cutout: '65%',
layout: {
padding: {