Ver código fonte

fix(T04): 修正 TrendChart 中 chartRenderConfig 的错误导入源

chartRenderConfig 由 utils/indicator-change.js 导出,此前误从 utils/indicator-timeline.js 导入,运行时取到 undefined,会导致 time 趋势图 renderConfig 调用 TypeError(白板)。将其拆分为两条 import:chartRenderConfig 走 indicator-change.js,其余(axisLabelIndices/normalizeDate/dateWithSourceMark/unitMismatchMark)仍走 indicator-timeline.js。

验证:node scripts/verify-vue-compile.js(391 文件全过)+ node scripts/audit-mp-antipatterns.js(目标 5 文件 0 告警)。
Sisyphus Agent 2 semanas atrás
pai
commit
9efb65396

+ 2 - 1
cfc-frontend/pages/health/components/TrendChart.vue

@@ -19,7 +19,8 @@
 
 <script>
 import { BrandColors } from '../../../utils/brand-colors.js'
-import { chartRenderConfig, axisLabelIndices, normalizeDate, dateWithSourceMark, unitMismatchMark } from '@/utils/indicator-timeline.js'
+import { chartRenderConfig } from '@/utils/indicator-change.js'
+import { axisLabelIndices, normalizeDate, dateWithSourceMark, unitMismatchMark } from '@/utils/indicator-timeline.js'
 /**
  * TrendChart - 多序列折线图 Canvas 组件(改造版)
  * 用法:<TrendChart :series="[{name,color,points:[{reportDate,value,unit,dateSource}]}]"