UNPKG

xframelib

Version:

积累的前端开发基础库,来源于项目和服务于项目。

93 lines (92 loc) 1.85 kB
import { Component } from 'vue'; import { Lazy } from './Config'; /** *布局枚举类型 */ export declare enum LayoutContainerEnum { top = 0, bottom = 1, centerBack = 2, centerMain = 3, centerFront = 4, left = 5, right = 6 } /** * 组件布局 */ export interface IWidgetLayout { top?: number | string; left?: number | string; right?: number | string; bottom?: number | string; width?: string; height?: string; /** * 扩展属性,支持应用 */ [props: string]: any; } export interface IWidgetConfig { /** * Layout标识名,以支撑多个布局使用 */ layoutID?: string; /** * 唯一ID,与组件名一致 */ id: string; /** * 标题或说明 */ label?: string; /** * 图标路径(备用) */ icon?: string; /** * 所属容器,top/bottom/left/right等 */ container: LayoutContainerEnum; /** * 外部组件js url(备用) */ jsURL?: string; /** * 外部组件css url(备用,暂不用) */ cssURL?: string; /** * 动态加载的组件 */ component: Lazy<Component>; /** * 是否初始化时,预加载 */ preload?: boolean; /** * 前置组件 ID,一般也就是bindid */ afterid?: string; /** * 20220424 WM:暂时去掉,容易混乱和循环引用 * 绑定依赖组件ID,不一定有afterid */ /** * 所属组,用于业务分类 */ group?: string; /** * 外部定义布局(备用) */ layout?: IWidgetLayout; /** * 组件的外部扩展样式(在layouts布局、视图页面里定义) * 通过定义class名称 */ cssClass?: string; /** * 扩展属性,支持应用 */ [props: string]: any; }