mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-25 15:00:10 +08:00
fix:修复状态变更时(如切换语言等),useSync.hook.ts 中 dataSyncFetch 反复执行导致 chartEditStore.componentList 重复
Signed-off-by: fankeke007 <610047449@qq.com>
This commit is contained in:
parent
3d568f08de
commit
e75e2ccfe6
@ -213,6 +213,9 @@ export const useSync = () => {
|
||||
|
||||
// * 数据获取
|
||||
const dataSyncFetch = async () => {
|
||||
// FIX:重新执行dataSyncFetch需清空chartEditStore.componentList,否则会导致图层重复
|
||||
// 切换语言等操作会导致重新执行 dataSyncFetch,此时pinia中并未清空chartEditStore.componentList,导致图层重复
|
||||
chartEditStore.componentList = []
|
||||
chartEditStore.setEditCanvas(EditCanvasTypeEnum.SAVE_STATUS, SyncEnum.START)
|
||||
try {
|
||||
const res = await fetchProjectApi({ projectId: fetchRouteParamsLocation() }) as unknown as MyResponseType
|
||||
|
Loading…
x
Reference in New Issue
Block a user