perf: 编辑JSON兼容后端优化

This commit is contained in:
潘潘
2022-11-15 16:26:52 +08:00
parent dec1130ace
commit 5cc20e9b19
3 changed files with 39 additions and 22 deletions
@@ -6,7 +6,7 @@ import { ChartEnum } from '@/enums/pageEnum'
import { SavePageEnum } from '@/enums/editPageEnum'
import { editToJsonInterval } from '@/settings/designSetting'
const { updateComponent } = useSync()
const { updateComponent, dataSyncUpdate } = useSync()
const chartEditStore = useChartEditStore()
// 侦听器更新
@@ -15,6 +15,7 @@ const useSyncUpdateHandle = () => {
let timer: any
const updateFn = (e: any) => updateComponent(e!.detail, true, false)
const syncData = async () => {
dataSyncUpdate && (await dataSyncUpdate())
dispatchEvent(new CustomEvent(SavePageEnum.CHART, { detail: chartEditStore.getStorageInfo }))
}