NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/g2/esm/chart/controller/base.d.ts

64 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-09-14 14:47:11 +08:00
import { ComponentOption } from '../../interface';
import View from '../view';
/** Component controller class type define */
export declare type ControllerCtor<O = any> = new (view: View) => Controller<O>;
/**
* Component Controller
* 1. option
* 2. API
* 3.
*/
export declare abstract class Controller<O = unknown> {
/** 是否可见 */
visible: boolean;
protected view: View;
/** option 配置,不同组件有自己不同的配置结构 */
protected option: O;
/** 所有的 component */
protected components: ComponentOption[];
constructor(view: View);
abstract get name(): string;
/**
* init the component
*/
abstract init(): any;
/**
* render the components
*/
abstract render(): any;
/**
* update the components
*/
/**
* do layout
*/
abstract layout(): any;
/**
*
* - id option
* - id diff
* -
* -
* -
*/
abstract update(): any;
/**
* clear
*/
clear(): void;
/**
* destroy the component
*/
destroy(): void;
/**
* get all components
* @returns components array
*/
getComponents(): ComponentOption[];
/**
* change visibility of component
* @param visible
*/
changeVisible(visible: boolean): void;
}