fix: 修复切换主题导致部分配置丢失问题 (#17828)

This commit is contained in:
王嘉豪
2026-01-19 16:33:59 +08:00
committed by wangjiahao
parent 0cfeee321f
commit 7c4460d1df

View File

@@ -101,7 +101,9 @@ const subjectEdit = () => {
const subjectChange = () => {
if (!themeSelected.value) {
dvMainStore.setCanvasStyle(JSON.parse(subjectItem.value.details))
const canvasStyleTemp = JSON.parse(subjectItem.value.details)
canvasStyleTemp['dashboard']['showGrid'] = canvasStyleTemp['dashboard']['showGrid'] || false
dvMainStore.setCanvasStyle(canvasStyleTemp)
snapshotStore.recordSnapshotCache('renderChart')
adaptCurThemeCommonStyleAll()
useEmitt().emitter.emit('onSubjectChange')