fix: 修改导入id重复的问题
This commit is contained in:
parent
2460fe4e86
commit
15fc418fc4
@ -6,7 +6,7 @@ import { CreateComponentType } from '@/packages/index.d'
|
|||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { ChartEditStoreEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { ChartEditStoreEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
||||||
import { readFile, goDialog } from '@/utils'
|
import { getUUID, readFile, goDialog } from '@/utils'
|
||||||
import { createComponent } from '@/packages'
|
import { createComponent } from '@/packages'
|
||||||
|
|
||||||
// 更新函数
|
// 更新函数
|
||||||
@ -40,7 +40,7 @@ const updateComponent = async (fileData: any, isSplace = false) => {
|
|||||||
)
|
)
|
||||||
// 不保存到记录
|
// 不保存到记录
|
||||||
chartEditStore.addComponentList(
|
chartEditStore.addComponentList(
|
||||||
Object.assign(newComponent, comItem),
|
Object.assign(newComponent, { ...comItem, id: getUUID() }),
|
||||||
false,
|
false,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user