@vtj/designer
Version:
VTJ 是一款基于 Vue3 + Typescript 的低代码页面可视化设计器。内置低代码引擎、渲染器和代码生成器,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。
24 lines (23 loc) • 1.27 kB
TypeScript
import { ComputedRef, ShallowReactive } from 'vue';
import { DirectiveModel, JSExpression, NodeDirectiveIterator, NodeModel } from '@vtj/core';
import { DesignHelper } from '../../framework';
import { Engine } from '../..';
export declare const createEmptyDirective: (name: string, iterator?: NodeDirectiveIterator) => DirectiveModel;
export declare const createModelDirective: (prop?: string) => DirectiveModel;
export declare function useDirectives(selected: ComputedRef<DesignHelper | null | undefined>): {
engine: ShallowReactive<Engine>;
node: ComputedRef< NodeModel | null>;
vIf: ComputedRef<DirectiveModel>;
vShow: ComputedRef<DirectiveModel>;
vBind: ComputedRef<DirectiveModel>;
vFor: ComputedRef<DirectiveModel>;
vHtml: ComputedRef<DirectiveModel>;
vModels: ComputedRef<DirectiveModel[]>;
customDirectives: ComputedRef<DirectiveModel[]>;
onValueChange: (name: "vIf" | "vShow" | "vBind" | "vFor" | "vHtml", value: JSExpression) => void;
onForChange: (name: string, value: any) => void;
onModelChange: (index: string, value: any) => void;
onAddCustom: () => void;
onRemoveCustom: (model: DirectiveModel) => Promise<void>;
onCustomChange: (model: DirectiveModel) => (name: string, value: any) => void;
};