Merge branch 'dev' into master-fetch-dev

This commit is contained in:
奔跑的面条
2023-05-28 15:59:08 +08:00
64 changed files with 2562 additions and 1127 deletions
+11 -1
View File
@@ -145,6 +145,11 @@ export const useSync = () => {
) => {
// 补充 class 上的方法
let newComponent: CreateComponentType = await createComponent(_componentInstance.chartConfig)
if (_componentInstance.chartConfig.redirectComponent) {
_componentInstance.chartConfig.dataset && (newComponent.option.dataset = _componentInstance.chartConfig.dataset)
newComponent.chartConfig.title = _componentInstance.chartConfig.title
newComponent.chartConfig.chartFrame = _componentInstance.chartConfig.chartFrame
}
if (callBack) {
if (changeId) {
callBack(componentMerge(newComponent, { ..._componentInstance, id: getUUID() }))
@@ -169,7 +174,7 @@ export const useSync = () => {
// 组件
if (key === ChartEditStoreEnum.COMPONENT_LIST) {
let loadIndex = 0
const listLength = projectData[key].length;
const listLength = projectData[key].length
for (const comItem of projectData[key]) {
// 设置加载数量
let percentage = parseInt((parseFloat(`${++loadIndex / listLength}`) * 100).toString())
@@ -198,6 +203,11 @@ export const useSync = () => {
} else {
await create(comItem as CreateComponentType)
}
if (percentage === 100) {
// 清除历史记录
chartHistoryStore.clearBackStack()
chartHistoryStore.clearForwardStack()
}
}
} else {
// 非组件(顺便排除脏数据)