Initial commit: 上传整个code目录
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { IconInfo } from './common';
|
||||
// #region 数据类型:左侧控件面板配置结构
|
||||
|
||||
// 数据类型:单个控件展示配置
|
||||
|
||||
export interface MaterialIcon extends IconInfo {
|
||||
style?: {
|
||||
width?: string
|
||||
height?: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import type { WidgetType } from '../widget-pc/WidgetType';
|
||||
import type { WidgetCategory } from './common';
|
||||
import type { MaterialIcon } from './DesignerConfig';
|
||||
import type { DragType } from './WidgetHelper';
|
||||
|
||||
export interface TreeNodeData<T extends WidgetType = WidgetType> {
|
||||
componentCode: string // componentCode
|
||||
category: WidgetCategory
|
||||
name: string // metaProps.name
|
||||
code: string // metaProps.code
|
||||
area?: string // area 仅插槽节点存在
|
||||
areaName?: string // area 名称
|
||||
type: T // type
|
||||
children: TreeNodeData<T>[]
|
||||
options: TreeNodeOptions
|
||||
icon?: MaterialIcon
|
||||
}
|
||||
|
||||
export interface TreeNodeOptions {
|
||||
canSelect: boolean // 是否可以被选中
|
||||
dragType: DragType // 拖拽类型
|
||||
showCopy: boolean // 是否有复制功能
|
||||
showDelete: boolean // 是否有删除功能
|
||||
hasHide: boolean // 是否有隐藏功能
|
||||
hasDrop: boolean // 是否可以被放置到该节点内
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export enum DragType {
|
||||
NO_DRAG = 0, // 不拖拽
|
||||
DRAG_WHOLE = 1, // 拖拽整个组件
|
||||
DRAG_HANDLE = 2, // 拖拽手柄
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { Recordable } from '../global';
|
||||
|
||||
export interface BaseWidgetSchema {
|
||||
componentCode?: string
|
||||
metaProps: {
|
||||
code: string
|
||||
name?: string
|
||||
component?: Recordable
|
||||
[key: string]: any
|
||||
}
|
||||
type?: string
|
||||
[key: string]: any
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
export enum WidgetCategory {
|
||||
SYS = 0, // 系统控件
|
||||
CUSTOM = 1, // 自定义控件
|
||||
DEBUGCUSTOM = 'debugCustom', // 自定义控件调试模式
|
||||
}
|
||||
|
||||
export enum WidgetNamespace {
|
||||
SYS = 'sys', // 系统控件
|
||||
CUSTOM = 'custom', // 自定义控件
|
||||
DEBUGCUSTOM = 'debugCustom',
|
||||
DEFAULT = 'default', // 默认控件
|
||||
}
|
||||
|
||||
export enum IconTypeEnum {
|
||||
ICONFONT = 'iconfont',
|
||||
FILE = 'file',
|
||||
}
|
||||
|
||||
export interface IconInfo {
|
||||
type: IconTypeEnum
|
||||
value: string
|
||||
}
|
||||
Reference in New Issue
Block a user