UNPKG

@vtj/renderer

Version:

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

67 lines (66 loc) 1.97 kB
import { ContextMode } from '../constants'; import { BlockSchema, JSFunction, JSExpression } from '@vtj/core'; import { Provider } from '../provider'; export interface ContextOptions { mode: ContextMode; dsl?: BlockSchema; attrs?: ContextAttrs; } export interface ContextAttrs { $components?: Record<string, any>; $libs?: Record<string, any>; $apis?: Record<string, any>; [key: string]: any; } export declare class Context { __id: string | null; __mode: ContextMode; __instance: any | null; __contextRefs: Record<string, Context>; __refs: Record<string, any>; __refCaches: Record<string, any>; /** * 记录每个节点 id 当前注册的 ref 回调代次, * 用于防止旧 ref 卸载回调(await delay 后执行)误删新 ref 已设置的 $refs 条目。 */ private __refGenerations; context: Record<string, any>; /** * @deprecated */ state: Record<string, any>; /** * @deprecated */ props: Record<string, any>; $props: Record<string, any>; $state: Record<string, any>; $refs: Record<string, any>; $el: any; $emit: any; $nextTick: any; $parent: any; $root: any; $attrs: any; $slots: any; $watch: any; $options: any; $forceUpdate: any; $components: Record<string, any>; $libs: Record<string, any>; $apis: Record<string, any>; $provider: Provider | null; $uni: any; $getApp: any; private __transform; constructor(options: ContextOptions); setup(attrs: Record<string, any>, Vue?: any): void; private __proxy; private __cleanup; private __reset; __parseFunction(code?: JSFunction): Function | undefined; __parseExpression(code?: JSExpression | JSFunction): any; __ref(id?: string | null, ref?: string | Function): any; __getRefEl(refs: Record<string, any>, key: string, el: any): any; __clone(context?: Record<string, any>): Context; }