mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
Merge branch 'dev' into master-fetch-dev
This commit is contained in:
@@ -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 {
|
||||
// 非组件(顺便排除脏数据)
|
||||
|
||||
Reference in New Issue
Block a user