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

@@ -239,7 +239,7 @@ const showDescriptionPopup = ref(false)
const activeDescTab = ref('month')
// Chart.js 相关
const { getChartOptions, getChartOptionsByType } = useChartTheme()
const { getChartOptions } = useChartTheme()
const formatMoney = (val) => {
if (Math.abs(val) >= 10000) {
@@ -500,7 +500,7 @@ const varianceChartData = computed(() => {
})
const varianceChartOptions = computed(() => {
return getChartOptionsByType('bar', {
return getChartOptions({
indexAxis: 'y',
plugins: {
legend: {
@@ -655,7 +655,7 @@ const burndownChartData = computed(() => {
})
const burndownChartOptions = computed(() => {
return getChartOptionsByType('line', {
return getChartOptions({
plugins: {
legend: {
display: true,
@@ -816,7 +816,7 @@ const yearBurndownChartData = computed(() => {
})
const yearBurndownChartOptions = computed(() => {
return getChartOptionsByType('line', {
return getChartOptions({
plugins: {
legend: {
display: true,