import { ButtonControlType } from "../small/button"; import { SwitchControlType } from "../small/switch"; import { LabelControlType } from "../small/label"; import { ButtonsControlType } from "../small/buttons"; import { RbColType, ServiceType } from "../parameters"; /** * 工具栏控件 */ export interface ToolbarControlType { layout?: ToolbarLayout; layoutService?: ServiceType; } export interface ToolbarLayout { set?: ToolbarSetType; left?: ToolbarAreaType; right?: ToolbarAreaType; center?: ToolbarAreaCenterType; /** * 事件集合 */ events?: ToolbarEvents; } export interface ToolbarEvents { } export interface ToolbarSetType { /** 主题风格, 默认是 dark */ theme?: "dark" | "table" | "light" | "block"; /** * 设置全局的靠边间距,默认为 8 */ pading?: number; } /** * 工具栏区域类型 */ export interface ToolbarAreaType { /** * 靠边间距,默认为 8 */ pading?: number; controls: { [id: string]: ToolbarControls; }; } export interface ToolbarAreaCenterType extends ToolbarAreaType { /** 设置居中工具栏布局,默认是`居中` */ wrapperCol?: RbColType; } /** * Toolbar可用控件列表 */ export interface ToolbarControls { button?: ButtonControlType; buttons?: ButtonsControlType; label?: LabelControlType; switch?: SwitchControlType; /** * 显示隔断符,指定为ture;false表示隐藏 */ separate?: boolean; }