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

This commit is contained in:
王嘉豪
2026-01-19 16:33:59 +08:00
committed by GitHub
parent 466f1dab37
commit 42cc8c5450

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')