fix(portfolio-backtest): 净值曲线watch加flush:'post'
CI/CD / test (push) Successful in 8s
CI/CD / nas-smoke (push) Successful in 2s
CI/CD / vps (push) Successful in 22s

watch(equityCurve) 默认 flush:'pre' 在 DOM 更新前触发,
equityEl div(在 v-if=result 内)尚未挂载→echarts.init 拿不到 DOM→空图。
flush:'post' 让 watch 在 DOM 更新后触发,曲线正常渲染。
This commit is contained in:
2026-07-31 13:21:16 +08:00
parent 4317d97fb0
commit 286c0bd069
@@ -65,7 +65,7 @@ function renderEquity(): void {
onMounted(() => {
// 等 dom 挂载后渲染(若有初始数据)
})
watch(equityCurve, renderEquity, { deep: true })
watch(equityCurve, renderEquity, { deep: true, flush: 'post' })
function fmtPct(v: number | null | undefined): string {
if (v === null || v === undefined || !Number.isFinite(v)) return '-'