UNPKG

snowy-designer

Version:

基于Epic-Designer-Pro版本的设计器,可视化开发页面表单

74 lines (73 loc) 2.07 kB
import { AsyncComponentLoader, Component, ShallowRef } from 'vue'; import { ContextMenuItem } from './contextMenu'; import { ComponentSchema } from './epic-pro'; export type ComponentType = AsyncComponentLoader | Component | string; export interface ActivitybarModel { component: any; icon: string; id: string; sort?: number; title: string; visible?: boolean; } export interface RightSidebarModel { component: any; id: string; sort?: number; title: string; visible?: boolean; } export interface ViewsContainersModel { activitybars: ShallowRef<ActivitybarModel[]>; rightSidebars: ShallowRef<RightSidebarModel[]>; } export type Components = Record<string, any>; export interface EventModel { description: string; type: string; } export interface ActionModel extends EventModel { args?: any[]; argsConfigs?: ComponentSchema[]; } export interface EditConstraintsModel { childImmovable?: boolean; fixedField?: boolean; immovable?: boolean; locked?: boolean; } export interface AttributeConfig extends ComponentSchema { children?: ComponentSchema[]; isGroup?: boolean; } export interface ComponentConfigModel { bindModel?: string; component: any; config: { action?: ActionModel[]; attribute?: AttributeConfig[]; event?: EventModel[]; style?: ComponentSchema[]; }; contextMenu?: ContextMenuItem[]; defaultSchema: ComponentSchema; editConstraints?: EditConstraintsModel; groupName?: string; icon?: string; ownSlots?: string[]; sort?: number; } export type ComponentConfigModelRecords = Record<string, ComponentConfigModel>; export interface PublicMethodModel { description?: string; handler: (...args: any[]) => any; method?: (...args: any[]) => any; methodName?: string; name: string; } export type PublicMethodsModel = Record<string, PublicMethodModel>; export interface ComponentGroup { list: ComponentSchema[]; title: string; } export type ComponentSchemaGroups = ComponentGroup[];