UNPKG

xframelib

Version:

The accumulated front-end development foundation library originates from projects and serves projects.

70 lines (69 loc) 1.45 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 IWidgetConfig { /** * Layout标识名,以支撑多个布局使用 */ layoutID?: string; /** * 唯一ID,与组件名一致 */ id: string; /** * 标题或说明 */ label?: string; /** * 图标路径(备用) */ icon?: string; /** * 所属容器,top/bottom/left/right等 */ container: LayoutContainerEnum; /** * 动态加载的组件 */ component: Lazy<Component>; /** * 是否初始化时,预加载 */ preload?: boolean; /** * 前置组件 ID,一般也就是bindid */ afterid?: string; /** * 所属组,用于业务分类 */ group?: string; /** * 修改style样式,例如外部定义布局、定义CSS变量等 */ style?: string | Record<string, unknown>; /** * 定义组件的外部css类名 * 组件的外部扩展样式(在layouts布局、视图页面里定义) */ class?: string; /** * Widget示例化后的对象,动态绑定上的 */ instance?: Component; /** * 扩展属性,支持应用 */ [props: string]: any; }