export interface Widget { name: string; key?: string; component?: any; autoDisable?: boolean; disableOther?: boolean | string[]; group?: string; visible?: boolean; data?: any; meta?: any; } /** * 用于Widget内部控制,和Widget间通信的 * (思想来源:Mars3D) * @returns */ export declare function useWidget(): { currentWidget: { /** * 当前widget实例对象 */ instance: import('vue').ComponentInternalInstance | null; /** * widget ID标识 */ wid: any; /** * LayoutID */ layoutid: any; /** * widget配置 */ widgetConfig: any; /** * 当前widget所属的LayoutManager对象 */ layoutManager: import('..').LayoutManager | undefined; /** * 对外绑定回调函数 * @param callback */ onUpdate(callback: any): void; }; /** * 获取LayoutManager * @param layoutID 默认空,为当前对应LayoutManager * @returns */ getLayoutManager(layoutID?: string): import('..').LayoutManager | undefined; /** * 改变widget的可见性 * @param visible * @param widgetID 默认为当前的widgetid,可插入其他widgetID */ setVisible(visible?: boolean, widgetID?: string): void; /** * 出发对应widget的onUpdate * @param widgetID * @param args */ updateWidget(widgetID?: string, args?: any): void; /** * 获取widget的当前激活状态 * (是否加载,是否可见) * @param widgetID 默认空,为当前widgetid * @returns */ isActivate: (widgetID?: string) => boolean | undefined; toggleLoad: (widOption?: string | string[], loadStatus?: boolean) => void; toggleActivate: (widOption?: string | string[]) => void; /** * 加载或卸载指定 widget模块 * ( 加载或卸载 ) * @param widOption */ activate: (widOption?: string | string[]) => void; disable: (option?: string | string[]) => void; };