fix: 修改导入组件id会重复的问题
This commit is contained in:
parent
b861587f01
commit
fb2edeb7d2
@ -1,5 +1,5 @@
|
||||
import { onUnmounted } from 'vue';
|
||||
import { httpErrorHandle, fetchRouteParamsByhistory } from '@/utils'
|
||||
import { getUUID, httpErrorHandle, fetchRouteParamsByhistory } from '@/utils'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { EditCanvasTypeEnum, ChartEditStoreEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
||||
@ -52,7 +52,7 @@ export const useSync = () => {
|
||||
)
|
||||
// 不保存到记录
|
||||
chartEditStore.addComponentList(
|
||||
Object.assign(newComponent, comItem),
|
||||
Object.assign(newComponent, {...comItem, id: getUUID()}),
|
||||
false,
|
||||
true
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user