feat: 优化交互组件

This commit is contained in:
奔跑的面条
2023-03-11 16:58:32 +08:00
parent 3f3f54f3b7
commit 05bb2a5eb6
32 changed files with 392 additions and 302 deletions
+10 -9
View File
@@ -1,4 +1,4 @@
import { BaseEvent, EventLife } from '@/enums/eventEnum'
import { BaseEvent, EventLife, InteractEvents, InteractEventOn, InteractActionType } from '@/enums/eventEnum'
import type { GlobalThemeJsonType } from '@/settings/chartThemes/index'
import type { RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
@@ -120,25 +120,26 @@ export interface PublicConfigType {
}
filter?: string
status: StatusType
interactActions?: InteractActionType[],
events: {
baseEvent: {
[K in BaseEvent]?: string
},
}
advancedEvents: {
[K in EventLife]?: string
},
eventsFn: {
on: 'change' | 'click' | undefined
components: string | undefined
fn: { [name: string]: string }
}[],
}
interactEvents: {
[InteractEvents.INTERACT_ON]: InteractEventOn.CHANGE | InteractEventOn.CLICK | undefined
[InteractEvents.INTERACT_COMPONENTS]: string | undefined
[InteractEvents.INTERACT_FN]: { [name: string]: string }
}[]
}
}
export interface CreateComponentType extends PublicConfigType, requestConfig {
key: string
chartConfig: ConfigType
option: GlobalThemeJsonType,
option: GlobalThemeJsonType
}
// 组件成组实例类