forked from github/dataease
Merge pull request #7647 from dataease/pr@dev-v2@fix_canvas
fix: 修复通过仪表板配置设置历史仪表板的图表标题字号,只有个别图表生效问题
This commit is contained in:
commit
f3be8d6204
@ -54,16 +54,20 @@ const themeAttrChange = (custom, property, value) => {
|
||||
if (canvasAttrInit) {
|
||||
Object.keys(canvasViewInfo.value).forEach(function (viewId) {
|
||||
const viewInfo = canvasViewInfo.value[viewId]
|
||||
if (custom === 'customAttr') {
|
||||
merge(viewInfo['customAttr'], value)
|
||||
} else {
|
||||
Object.keys(value).forEach(function (key) {
|
||||
if (viewInfo[custom][property][key] !== undefined) {
|
||||
viewInfo[custom][property][key] = value[key]
|
||||
}
|
||||
})
|
||||
try {
|
||||
if (custom === 'customAttr') {
|
||||
merge(viewInfo['customAttr'], value)
|
||||
} else {
|
||||
Object.keys(value).forEach(function (key) {
|
||||
if (viewInfo[custom][property][key] !== undefined) {
|
||||
viewInfo[custom][property][key] = value[key]
|
||||
}
|
||||
})
|
||||
}
|
||||
useEmitt().emitter.emit('renderChart-' + viewId, viewInfo)
|
||||
} catch (e) {
|
||||
console.warn('themeAttrChange-error')
|
||||
}
|
||||
useEmitt().emitter.emit('renderChart-' + viewId, viewInfo)
|
||||
})
|
||||
snapshotStore.recordSnapshotCache('renderChart')
|
||||
}
|
||||
|
@ -33,17 +33,21 @@ const onBaseChange = () => {
|
||||
const themeAttrChange = (custom, property, value) => {
|
||||
if (canvasAttrInit) {
|
||||
Object.keys(canvasViewInfo.value).forEach(function (viewId) {
|
||||
const viewInfo = canvasViewInfo.value[viewId]
|
||||
if (custom === 'customAttr') {
|
||||
merge(viewInfo['customAttr'], value)
|
||||
} else {
|
||||
Object.keys(value).forEach(function (key) {
|
||||
if (viewInfo[custom][property][key] !== undefined) {
|
||||
viewInfo[custom][property][key] = value[key]
|
||||
}
|
||||
})
|
||||
try {
|
||||
const viewInfo = canvasViewInfo.value[viewId]
|
||||
if (custom === 'customAttr') {
|
||||
merge(viewInfo['customAttr'], value)
|
||||
} else {
|
||||
Object.keys(value).forEach(function (key) {
|
||||
if (viewInfo[custom][property][key] !== undefined) {
|
||||
viewInfo[custom][property][key] = value[key]
|
||||
}
|
||||
})
|
||||
}
|
||||
useEmitt().emitter.emit('renderChart-' + viewId, viewInfo)
|
||||
} catch (e) {
|
||||
console.warn('themeAttrChange-error')
|
||||
}
|
||||
useEmitt().emitter.emit('renderChart-' + viewId, viewInfo)
|
||||
})
|
||||
snapshotStore.recordSnapshotCache('renderChart')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user