refactor(仪表板): 增加自动缓存的附加信息,防止编辑界面没有显示名称

This commit is contained in:
wangjiahao 2022-08-29 17:59:41 +08:00
parent 5c171db343
commit 74c1d2b249

View File

@ -337,7 +337,11 @@ export default {
const _this = this
_this.timer = setInterval(() => {
if (_this.$store.state.cacheStyleChangeTimes > 0) {
const cacheRequest = _this.savePrepare()
const requestInfo = _this.savePrepare()
const cacheRequest ={
...this.panelInfo,
...requestInfo
}
saveCache(cacheRequest)
_this.$store.state.cacheStyleChangeTimes = 0
}
@ -346,8 +350,7 @@ export default {
savePrepare() {
//
const requestInfo = {
...
this.panelInfo,
id: this.panelInfo.id,
panelStyle: JSON.stringify(this.canvasStyleData),
panelData: JSON.stringify(this.componentData)
}