export interface IPanel { /** 打开面板 */ open: () => void; /** 关闭面板 */ close: () => void; /** 更新面板 */ update: (option: Option) => void; /** 销毁面板 */ destroy: () => void; } export type Option = Partial<{ position: Array; type: PanelType; title: TitleOption; content: ContentOption; width: number; height: number; bgColor: string; bgUrl: string; borderRadius: number; padding: string; closeable: boolean; className: string; customStyle: object; onClose: () => void; }>; export type PanelPosition = 'left' | 'right' | 'top' | 'bottom' | 'center'; export type PanelType = 'info' | 'warning' | 'error' | 'success'; export type TitleOption = Partial<{ value: string; fontSize: string; color: string; fontFamily: string; fontWeight: number; lineHeight: number | string; textAlign: string; padding: string; margin: string; icon: string; }>; export type ContentOption = Partial<{ value: string | HTMLElement; fontSize: string; color: string; fontFamily: string; fontWeight: number; lineHeight: string; textAlign: string; padding: string; margin: string; textIndent: string; }>;