perf: 编辑JSON优化

This commit is contained in:
潘潘
2022-11-15 16:21:35 +08:00
parent 31b5a6961b
commit 786458adfe
3 changed files with 11 additions and 15 deletions
@@ -8,17 +8,14 @@ import { editToJsonInterval } from '@/settings/designSetting'
const { updateComponent } = useSync()
const chartEditStore = useChartEditStore()
// 侦听器更新
const useSyncUpdateHandle = () => {
const routerParamsInfo = useRoute()
// 定义侦听器变量
let timer: any
const updateFn = (e: any) => updateComponent(e!.detail, true, false)
const syncData = () => {
if (routerParamsInfo.name == ChartEnum.CHART_HOME_NAME) {
dispatchEvent(new CustomEvent(SavePageEnum.CHART, { detail: chartEditStore.getStorageInfo }))
}
const syncData = async () => {
dispatchEvent(new CustomEvent(SavePageEnum.CHART, { detail: chartEditStore.getStorageInfo }))
}
// 开启侦听