mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 处理旧数据基础事件报错的问题
This commit is contained in:
@@ -3,7 +3,7 @@ import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore
|
||||
import { ChartEditStoreEnum, ChartEditStorage } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
||||
import { fetchChartComponent, fetchConfigComponent, createComponent } from '@/packages/index'
|
||||
import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
||||
import { BaseEvent, EventLife, CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
||||
import { PublicGroupConfigClass } from '@/packages/public/publicConfig'
|
||||
import merge from 'lodash/merge'
|
||||
|
||||
@@ -35,7 +35,18 @@ const componentVersionUpdatePolyfill = (newObject: any, sources: any) => {
|
||||
newObject.events.advancedEvents.vnodeMounted = sources?.events.vnodeMounted
|
||||
}
|
||||
if (hasVnodeBeforeMount || hasVnodeMounted) {
|
||||
sources.events = undefined
|
||||
sources.events = {
|
||||
baseEvent: {
|
||||
[BaseEvent.ON_CLICK]: undefined,
|
||||
[BaseEvent.ON_DBL_CLICK]: undefined,
|
||||
[BaseEvent.ON_MOUSE_ENTER]: undefined,
|
||||
[BaseEvent.ON_MOUSE_LEAVE]: undefined
|
||||
},
|
||||
advancedEvents: {
|
||||
[EventLife.VNODE_MOUNTED]: undefined,
|
||||
[EventLife.VNODE_BEFORE_MOUNT]: undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
return newObject
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user