UNPKG

@vtj/designer

Version:

VTJ 是一款基于 Vue3 + Typescript 的低代码页面可视化设计器。内置低代码引擎、渲染器和代码生成器,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。

411 lines (410 loc) 25.4 kB
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, Ref, ComputedRef, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue'; import { Props } from './logo/index'; import { Props } from './toolbar/index'; import { Props } from './actions/index'; import { Designer } from '../..'; import { Props } from '../editor/Editor'; import { Props } from './style/index'; import { Props } from './previewer/index'; import { Props } from './docs/index'; import { ActionMenuItem } from '@vtj/ui'; import { Props } from '../shared/panel'; import { OnCleanup } from '@vue/reactivity'; import { Props } from './about/index'; export declare const widgets: { Logo: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, { text: string; }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; EmptyWidget: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>; Switcher: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { click: (...args: any[]) => void; }, string, PublicProps, Readonly<{}> & Readonly<{ onClick?: ((...args: any[]) => any) | undefined; }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Toolbar: DefineComponent<Props, { mode: Ref<string, string>; outline: Ref<boolean, boolean>; customSize: Ref<{ width: number; height: number; }, { width: number; height: number; } | { width: number; height: number; }>; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; Actions: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, { coder: boolean; onlyPublishTemplate: boolean; }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; Pages: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Blocks: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Components: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Outline: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; History: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Apis: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Deps: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Designer: DefineComponent<{}, { designer: ComputedRef< Designer | null>; mode: ComputedRef<any>; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, { container: HTMLDivElement; iframe: HTMLIFrameElement; }, any>; Scripts: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Properties: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Events: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Css: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, { editorRef: CreateComponentPublicInstanceWithMixins<Readonly< Props> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; }>, { getEditor: () => import("monaco-editor").editor.IStandaloneCodeEditor | null; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:modelValue": (...args: any[]) => void; blur: (...args: any[]) => void; change: (...args: any[]) => void; }, PublicProps, { height: string; modelValue: string; dark: boolean; readonly: boolean; options: import("monaco-editor").editor.IEditorConstructionOptions; lang: string; minimap: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< Props> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; }>, { getEditor: () => import("monaco-editor").editor.IStandaloneCodeEditor | null; }, {}, {}, {}, { height: string; modelValue: string; dark: boolean; readonly: boolean; options: import("monaco-editor").editor.IEditorConstructionOptions; lang: string; minimap: boolean; }> | null; }, any>; Directives: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Defined: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; DataSources: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Style: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>; Previewer: DefineComponent<Props, { refresh: () => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, { container: HTMLDivElement; iframe: HTMLIFrameElement; }, HTMLDivElement>; NodePath: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Schema: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, { editorRef: CreateComponentPublicInstanceWithMixins<Readonly< Props> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; }>, { getEditor: () => import("monaco-editor").editor.IStandaloneCodeEditor | null; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:modelValue": (...args: any[]) => void; blur: (...args: any[]) => void; change: (...args: any[]) => void; }, PublicProps, { height: string; modelValue: string; dark: boolean; readonly: boolean; options: import("monaco-editor").editor.IEditorConstructionOptions; lang: string; minimap: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< Props> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; }>, { getEditor: () => import("monaco-editor").editor.IStandaloneCodeEditor | null; }, {}, {}, {}, { height: string; modelValue: string; dark: boolean; readonly: boolean; options: import("monaco-editor").editor.IEditorConstructionOptions; lang: string; minimap: boolean; }> | null; }, any>; Raw: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, { editorRef: CreateComponentPublicInstanceWithMixins<Readonly< Props> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; }>, { getEditor: () => import("monaco-editor").editor.IStandaloneCodeEditor | null; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:modelValue": (...args: any[]) => void; blur: (...args: any[]) => void; change: (...args: any[]) => void; }, PublicProps, { height: string; modelValue: string; dark: boolean; readonly: boolean; options: import("monaco-editor").editor.IEditorConstructionOptions; lang: string; minimap: boolean; }, false, {}, {}, GlobalComponents, GlobalDirectives, string, { container: HTMLDivElement; }, HTMLDivElement, ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, Readonly< Props> & Readonly<{ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; }>, { getEditor: () => import("monaco-editor").editor.IStandaloneCodeEditor | null; }, {}, {}, {}, { height: string; modelValue: string; dark: boolean; readonly: boolean; options: import("monaco-editor").editor.IEditorConstructionOptions; lang: string; minimap: boolean; }> | null; }, any>; Docs: DefineComponent<Props, { refresh: () => void; reload: () => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, { url: string; }, {}, {}, {}, string, ComponentProvideOptions, false, { panel: ({ $: ComponentInternalInstance; $data: {}; $props: { readonly title?: string | undefined; readonly subtitle?: string | undefined; readonly plus?: boolean | undefined; readonly refresh?: boolean | undefined; readonly back?: boolean | undefined; readonly edit?: boolean | undefined; readonly remove?: boolean | undefined; readonly save?: boolean | undefined; readonly header?: boolean | undefined; readonly collapsable?: boolean | undefined; readonly menus?: ActionMenuItem[] | undefined; readonly onCommand?: ((...args: any[]) => any) | undefined; readonly onRefresh?: ((...args: any[]) => any) | undefined; readonly onPlus?: ((...args: any[]) => any) | undefined; readonly onBack?: ((...args: any[]) => any) | undefined; readonly onEdit?: ((...args: any[]) => any) | undefined; readonly onRemove?: ((...args: any[]) => any) | undefined; readonly onSave?: ((...args: any[]) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: Slot<any> | undefined; }>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $host: Element | null; $emit: ((event: "command", ...args: any[]) => void) & ((event: "refresh", ...args: any[]) => void) & ((event: "plus", ...args: any[]) => void) & ((event: "back", ...args: any[]) => void) & ((event: "edit", ...args: any[]) => void) & ((event: "remove", ...args: any[]) => void) & ((event: "save", ...args: any[]) => void); $el: any; $options: ComponentOptionsBase<Readonly< Props> & Readonly<{ onCommand?: ((...args: any[]) => any) | undefined; onRefresh?: ((...args: any[]) => any) | undefined; onPlus?: ((...args: any[]) => any) | undefined; onBack?: ((...args: any[]) => any) | undefined; onEdit?: ((...args: any[]) => any) | undefined; onRemove?: ((...args: any[]) => any) | undefined; onSave?: ((...args: any[]) => any) | undefined; }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { command: (...args: any[]) => void; refresh: (...args: any[]) => void; plus: (...args: any[]) => void; back: (...args: any[]) => void; edit: (...args: any[]) => void; remove: (...args: any[]) => void; save: (...args: any[]) => void; }, string, { header: boolean; menus: ActionMenuItem[]; }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; } & Readonly<{ header: boolean; menus: ActionMenuItem[]; }> & Omit<Readonly< Props> & Readonly<{ onCommand?: ((...args: any[]) => any) | undefined; onRefresh?: ((...args: any[]) => any) | undefined; onPlus?: ((...args: any[]) => any) | undefined; onBack?: ((...args: any[]) => any) | undefined; onEdit?: ((...args: any[]) => any) | undefined; onRemove?: ((...args: any[]) => any) | undefined; onSave?: ((...args: any[]) => any) | undefined; }>, "header" | "menus"> & ShallowUnwrapRef<{}> & {} & ComponentCustomProperties & {} & { $slots: { actions?(_: {}): any; default?(_: {}): any; footer?(_: {}): any; }; }) | null; frame: HTMLIFrameElement; }, any>; About: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>; ProjectConfig: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; UniConfig: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; Market: DefineComponent<{}, { openDesigner: () => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, { panel: ({ $: ComponentInternalInstance; $data: {}; $props: { readonly title?: string | undefined; readonly subtitle?: string | undefined; readonly plus?: boolean | undefined; readonly refresh?: boolean | undefined; readonly back?: boolean | undefined; readonly edit?: boolean | undefined; readonly remove?: boolean | undefined; readonly save?: boolean | undefined; readonly header?: boolean | undefined; readonly collapsable?: boolean | undefined; readonly menus?: ActionMenuItem[] | undefined; readonly onCommand?: ((...args: any[]) => any) | undefined; readonly onRefresh?: ((...args: any[]) => any) | undefined; readonly onPlus?: ((...args: any[]) => any) | undefined; readonly onBack?: ((...args: any[]) => any) | undefined; readonly onEdit?: ((...args: any[]) => any) | undefined; readonly onRemove?: ((...args: any[]) => any) | undefined; readonly onSave?: ((...args: any[]) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps; $attrs: { [x: string]: unknown; }; $refs: { [x: string]: unknown; }; $slots: Readonly<{ [name: string]: Slot<any> | undefined; }>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $host: Element | null; $emit: ((event: "command", ...args: any[]) => void) & ((event: "refresh", ...args: any[]) => void) & ((event: "plus", ...args: any[]) => void) & ((event: "back", ...args: any[]) => void) & ((event: "edit", ...args: any[]) => void) & ((event: "remove", ...args: any[]) => void) & ((event: "save", ...args: any[]) => void); $el: any; $options: ComponentOptionsBase<Readonly< Props> & Readonly<{ onCommand?: ((...args: any[]) => any) | undefined; onRefresh?: ((...args: any[]) => any) | undefined; onPlus?: ((...args: any[]) => any) | undefined; onBack?: ((...args: any[]) => any) | undefined; onEdit?: ((...args: any[]) => any) | undefined; onRemove?: ((...args: any[]) => any) | undefined; onSave?: ((...args: any[]) => any) | undefined; }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { command: (...args: any[]) => void; refresh: (...args: any[]) => void; plus: (...args: any[]) => void; back: (...args: any[]) => void; edit: (...args: any[]) => void; remove: (...args: any[]) => void; save: (...args: any[]) => void; }, string, { header: boolean; menus: ActionMenuItem[]; }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & { beforeCreate?: (() => void) | (() => void)[]; created?: (() => void) | (() => void)[]; beforeMount?: (() => void) | (() => void)[]; mounted?: (() => void) | (() => void)[]; beforeUpdate?: (() => void) | (() => void)[]; updated?: (() => void) | (() => void)[]; activated?: (() => void) | (() => void)[]; deactivated?: (() => void) | (() => void)[]; beforeDestroy?: (() => void) | (() => void)[]; beforeUnmount?: (() => void) | (() => void)[]; destroyed?: (() => void) | (() => void)[]; unmounted?: (() => void) | (() => void)[]; renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]; errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[]; }; $forceUpdate: () => void; $nextTick: nextTick; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle; } & Readonly<{ header: boolean; menus: ActionMenuItem[]; }> & Omit<Readonly< Props> & Readonly<{ onCommand?: ((...args: any[]) => any) | undefined; onRefresh?: ((...args: any[]) => any) | undefined; onPlus?: ((...args: any[]) => any) | undefined; onBack?: ((...args: any[]) => any) | undefined; onEdit?: ((...args: any[]) => any) | undefined; onRemove?: ((...args: any[]) => any) | undefined; onSave?: ((...args: any[]) => any) | undefined; }>, "header" | "menus"> & ShallowUnwrapRef<{}> & {} & ComponentCustomProperties & {} & { $slots: { actions?(_: {}): any; default?(_: {}): any; footer?(_: {}): any; }; }) | null; frame: HTMLIFrameElement; }, any>; Templates: DefineComponent<{}, { refreshTemplates: () => void; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; UserAvatar: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>; };