@vtj/designer
Version:
VTJ 是一款基于 Vue3 + Typescript 的低代码页面可视化设计器。内置低代码引擎、渲染器和代码生成器,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。
40 lines (39 loc) • 1.41 kB
TypeScript
import { Ref, ComputedRef } from 'vue';
import { Dependencie, ApiSchema, MetaSchema, ProjectConfig, UniConfig, NodeModel, BlockModel, DropPosition } from '@vtj/core';
import { Designer, VtjElement } from '../..';
export declare function useDesigner(iframe: Ref<HTMLIFrameElement | undefined>, dependencies: Ref<Dependencie[]>, apis: Ref<ApiSchema[]>, meta: Ref<MetaSchema[]>, config: Ref<ProjectConfig>, uniConfig: Ref<UniConfig>): {
designer: ComputedRef< Designer | null>;
dropping: ComputedRef<{
style: Record<string, any>;
position: string;
model: NodeModel | BlockModel;
el: VtjElement;
rect: DOMRect;
type?: DropPosition;
path?: Array< NodeModel | BlockModel>;
} | null>;
hover: ComputedRef<{
style: Record<string, any>;
position: string;
model: NodeModel | BlockModel;
el: VtjElement;
rect: DOMRect;
type?: DropPosition;
path?: Array< NodeModel | BlockModel>;
} | null>;
selected: ComputedRef<{
style: Record<string, any>;
position: string;
model: NodeModel | BlockModel;
el: VtjElement;
rect: DOMRect;
type?: DropPosition;
path?: Array< NodeModel | BlockModel>;
} | null>;
lines: ComputedRef<{
width: string;
height: string;
left: string;
top: string;
}[]>;
};