Constructors
constructor
- new UIConfigManager(initialConfig?): UIConfigManager
Parameters
- initialConfig: Partial<UIConfig> = {}
Methods
getConfig
- getConfig(): UIConfig
Returns UIConfig
updateConfig
- updateConfig(updates): void
Parameters
- updates: Partial<UIConfig>
Returns void
updateComponentConfig
- updateComponentConfig(componentId, updates): void
Parameters
- componentId: string
- updates: Partial<ComponentConfig>
Returns void
addComponent
- addComponent(componentConfig): void
Parameters
- componentConfig: ComponentConfig
Returns void
removeComponent
- removeComponent(componentId): void
Returns void
getCurrentScreenType
- getCurrentScreenType(): "mobile" | "desktop" | "tablet"
Returns "mobile" | "desktop" | "tablet"
getCurrentLayoutConfig
- getCurrentLayoutConfig(): LayoutConfig
Returns LayoutConfig
getVisibleComponents
- getVisibleComponents(): string[]
Returns string[]
isComponentVisible
- isComponentVisible(componentId): boolean
Returns boolean
getComponentConfig
- getComponentConfig(componentId): undefined | ComponentConfig
Returns undefined | ComponentConfig
onConfigChange
- onConfigChange(listener): (() => void)
Parameters
- listener: ((config) => void)
- (config): void
Returns void
Returns (() => void)
获取当前配置