@joker.front/core 1.2.136 → 1.2.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +48 -73
  2. package/dist/bundle.es.js +7 -11
  3. package/dist/bundle.js +7 -11
  4. package/package.json +7 -3
  5. package/types/component.d.ts +2 -1
  6. package/types/components/component.d.ts +0 -13
  7. package/types/components/container.d.ts +0 -15
  8. package/types/components/template.d.ts +0 -7
  9. package/types/docs/build/docs.d.ts +0 -1
  10. package/types/docs/build/markdown-it-demo.d.ts +0 -3
  11. package/types/docs/build/utils.d.ts +0 -3
  12. package/types/docs/common/loading.d.ts +0 -2
  13. package/types/docs/main.d.ts +0 -1
  14. package/types/eventBus.d.ts +0 -15
  15. package/types/filter.d.ts +0 -13
  16. package/types/src/component.d.ts +0 -216
  17. package/types/src/event-bus.d.ts +0 -15
  18. package/types/src/filter.d.ts +0 -13
  19. package/types/src/hmr.d.ts +0 -15
  20. package/types/src/index.d.ts +0 -10
  21. package/types/src/observer/dep.d.ts +0 -46
  22. package/types/src/observer/index.d.ts +0 -46
  23. package/types/src/observer/watcher.d.ts +0 -46
  24. package/types/src/parser/command/code.d.ts +0 -6
  25. package/types/src/parser/command/condition.d.ts +0 -22
  26. package/types/src/parser/command/for.d.ts +0 -23
  27. package/types/src/parser/command/section.d.ts +0 -8
  28. package/types/src/parser/comment.d.ts +0 -6
  29. package/types/src/parser/component.d.ts +0 -23
  30. package/types/src/parser/element.d.ts +0 -9
  31. package/types/src/parser/index.d.ts +0 -77
  32. package/types/src/parser/parser.d.ts +0 -82
  33. package/types/src/parser/render.d.ts +0 -86
  34. package/types/src/parser/text.d.ts +0 -6
  35. package/types/src/parser/vnode.d.ts +0 -182
  36. package/types/src/props.d.ts +0 -9
  37. package/types/src/utils/DI.d.ts +0 -15
@@ -1,46 +0,0 @@
1
- import { Watcher } from "./watcher";
2
- /**
3
- * 作为观察者和对象代理中间的关系桥
4
- * 数据变更时:Ob->dep->watcher
5
- * 设置依赖时:watcher->dep
6
- */
7
- export declare class Dep {
8
- /**
9
- * 关系id,尽在production模式下生效
10
- */
11
- id: string;
12
- /**
13
- * 当前目标的监听者
14
- *
15
- * 在更改值之前,设置该静态值,使其在值变更时收集相应的依赖关系
16
- * 设置完毕后清除该值
17
- *
18
- * 之所以采用静态值,不采用方法的原因:
19
- * 可能存在多值变更,或者读取
20
- */
21
- static target?: Watcher<any>;
22
- watchers: Map<string | symbol, Watcher<any>[]>;
23
- /**
24
- * 设置依赖
25
- * @param key
26
- */
27
- depend(key: string | symbol): void;
28
- /**
29
- * 添加观察者
30
- * @param key
31
- * @param watcher
32
- */
33
- addWatcher(key: string | symbol, watcher: Watcher<any>): void;
34
- /**
35
- * 删除观察者
36
- * @param key
37
- * @param watcher
38
- */
39
- removeWatcher(key: string | symbol, watcher: Watcher<any>): void;
40
- /**
41
- * 通知key下面的观察者
42
- * @param key
43
- */
44
- notify(key: string | symbol): void;
45
- }
46
- export declare function notifyGroupDeps(list: Map<Dep, Array<string | symbol>>): void;
@@ -1,46 +0,0 @@
1
- /**
2
- * 存放劫持对象的Dep的Key
3
- */
4
- export declare const OBJECTPROXY_DEPID: unique symbol;
5
- /**
6
- * 数据劫持
7
- * @param data 数据
8
- * @param clone 是否clone
9
- * @returns 返回可观察对象
10
- */
11
- export declare function observer<T extends Object>(data: T, clone?: boolean): T;
12
- /**
13
- * 定义可劫持观察的属性
14
- *
15
- * 该方法会污染value深层,如想纯净数据,自行clone
16
- * @param target
17
- * @param key
18
- * @param value
19
- */
20
- export declare function defineObserverProperty(target: any, key: string | symbol, value: any): void;
21
- /**
22
- * 浅劫持监听,不污染数据源,只对根值监听,不对属性监听
23
- * @returns
24
- */
25
- export declare class ShallowObserver<T> {
26
- private data;
27
- private dep;
28
- constructor(data: T);
29
- /**
30
- * 是否有变更
31
- */
32
- isChanged: boolean;
33
- get value(): T;
34
- set value(newVal: T);
35
- }
36
- /**
37
- * 组合回复,针对大量值变更,又不想频繁更新DOM,
38
- * 可通过该方法实现一个作用域内的统一组合回复
39
- * @param func 处理方法
40
- * @returns
41
- */
42
- export declare function combinedReply(func: Function): void;
43
- /**
44
- * 判断一个值是否是已被数据代理劫持
45
- */
46
- export declare function isObserverData(data: any): boolean;
@@ -1,46 +0,0 @@
1
- import { Dep } from "./dep";
2
- /**
3
- * 观察者
4
- *
5
- * 负责观察对象,并收集依赖关系,并在值变更时做出回调响应
6
- */
7
- export declare class Watcher<T extends object = any> {
8
- private ob;
9
- private updateCallBack;
10
- private forceCallBack?;
11
- private getter;
12
- value: any;
13
- isDestroy: boolean;
14
- /**
15
- * 运行时的关系收集
16
- *
17
- * 主要作用是:运行时做基本的重复过滤,并收集当前“有效的”Dep关系
18
- * 一个Dep 肯定对应一个对象, 对象的key不会出现重复
19
- */
20
- private runRelations;
21
- /**
22
- * 实际关系
23
- */
24
- relations: Map<Dep, Array<string | symbol>>;
25
- /**
26
- *
27
- * @param ob 数据源
28
- * @param expOrFn 表达式(string|Function)
29
- * @param updateCallBack update回调
30
- * @param forceCallBack 是否强制回调, 有些值未变更时也会强制回调
31
- */
32
- constructor(ob: T | (() => T), updateCallBack: Function, expOrFn?: string | ((obj: T) => any | void) | Function, forceCallBack?: boolean | undefined);
33
- getValue(): any;
34
- /**
35
- * 添加Dep关系
36
- * @param dep
37
- * @param key
38
- */
39
- addDep(dep: Dep, key: string | symbol): void;
40
- /**
41
- * 更新值,并对其进行响应
42
- */
43
- update(): void;
44
- destroy(): void;
45
- private clearnDeps;
46
- }
@@ -1,6 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "../parser";
3
- import { VNode } from "../vnode";
4
- export declare class ParserCode extends IParser<AST.PropertyOrFunctionCommand, VNode.Text | VNode.Html> {
5
- parser(): void;
6
- }
@@ -1,22 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "../parser";
3
- import { VNode } from "../vnode";
4
- export declare class ParserCondition extends IParser<AST.IfCommand, VNode.Condition> {
5
- parser(): void;
6
- /**
7
- * 渲染子集
8
- *
9
- * @return 返回当前渲染是否有显示变更
10
- */
11
- private renderConditionChildren;
12
- /**
13
- * 获取同级前面的判断条件结果,如果有一个true则返回true,
14
- * 否则认为上面所有条件判断都为false
15
- * @returns
16
- */
17
- private getPrevIfResult;
18
- /**
19
- * 重载所有的判断(从上到下)
20
- */
21
- private reloadAllCondition;
22
- }
@@ -1,23 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "../parser";
3
- import { VNode } from "../vnode";
4
- export declare class ParserList extends IParser<AST.ForCommand, VNode.List> {
5
- parser(): void;
6
- private renderChildrens;
7
- private renderConditionChildrens;
8
- private renderInOrOfChildrens;
9
- /**
10
- * 渲染循环项
11
- * @param ob
12
- * @param index
13
- */
14
- private renderItem;
15
- /**
16
- * 销毁历史遗留多余的节点
17
- * @param index
18
- */
19
- private destroyOldChildrens;
20
- }
21
- export declare class ParserListeItem extends IParser<AST.ForCommand, VNode.ListItem> {
22
- parser(): void;
23
- }
@@ -1,8 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "../parser";
3
- import { VNode } from "../vnode";
4
- export declare const DEFAULT_SECTION_TAG = "default";
5
- export declare class ParserRenderSection extends IParser<AST.PropertyOrFunctionCommand, VNode.RenderSection> {
6
- parser(): void;
7
- private transformParam;
8
- }
@@ -1,6 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "./parser";
3
- import { VNode } from "./vnode";
4
- export declare class ParserComment extends IParser<AST.Comment, VNode.Comment> {
5
- parser(): void;
6
- }
@@ -1,23 +0,0 @@
1
- import { AST, IComponent } from "@joker.front/ast";
2
- import { IParser } from "./parser";
3
- import { Component } from "../component";
4
- import { VNode } from "./vnode";
5
- export declare function checkIsComponent(tagName: string, ob: Component): boolean;
6
- export declare class ParserComponent extends IParser<(AST.Element | AST.Component) & {
7
- node?: VNode.Component<IComponent>;
8
- }, VNode.Component<IComponent>> {
9
- parser(): void;
10
- /**
11
- * 是否允许重载
12
- * 直接指向内存的组件,无法重新实例化
13
- */
14
- get canReload(): boolean;
15
- /** 用于重载 */
16
- reload(): void;
17
- private initPropData;
18
- private initEvent;
19
- private renderChildren;
20
- private getSections;
21
- protected beforeDestroy(keepalive?: boolean): void;
22
- private transformPropValue;
23
- }
@@ -1,9 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "./parser";
3
- import { VNode } from "./vnode";
4
- export declare class ParserElement extends IParser<AST.Element, VNode.Element> {
5
- parser(): void;
6
- private initAttributes;
7
- private initEvents;
8
- private transformAttrVal;
9
- }
@@ -1,77 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { Component } from "../component";
3
- import { Render } from "./render";
4
- import { VNode } from "./vnode";
5
- export type NodeChangeType = "append" | "remove" | "update" | "after-enter" | "after-leave";
6
- export type ObType = Component & Record<string, any>;
7
- export declare class ParserTemplate {
8
- asts: AST.Node[];
9
- ob: ObType;
10
- /** VNode 根 */
11
- root: VNode.Root;
12
- /** VNode ref索引集 */
13
- refs: Record<string, Array<VNode.Node>>;
14
- sleeped: boolean;
15
- /**
16
- * node变更观察者
17
- */
18
- nodeWatcherEvents: Record<string, Array<(node: VNode.Node, type: NodeChangeType, propertyKey?: string) => void>>;
19
- /** VNode 渲染处理程序 (依赖注入) */
20
- render: Render.IRender;
21
- constructor(asts: AST.Node[], ob: ObType, parent?: VNode.Node);
22
- parser(): void;
23
- /**
24
- * VNode挂载
25
- * @param root
26
- */
27
- mount(root: any): void;
28
- /**
29
- * 编译AST子集
30
- * @param asts
31
- * @param parent
32
- */
33
- parserNodes(asts: AST.Node[], parent: VNode.Node, ob?: Component & Record<string, any>): void;
34
- /**
35
- * 添加ref
36
- * @param refName ref值
37
- * @param node VNode节点
38
- */
39
- addRef(refKey: string, node: VNode.Node): void;
40
- /**
41
- * 移除Node所在ref
42
- * @param node VNode节点
43
- */
44
- removeRef(node: VNode.Node): void;
45
- /**
46
- * 添加节点变更观察者
47
- * @param ref
48
- * @param callBack
49
- */
50
- addNodeWatcher(ref: string, callBack: (node: VNode.Node, type: NodeChangeType) => void): void;
51
- /**
52
- * 移除节点变更观察者
53
- * @param ref
54
- * @param callBack
55
- */
56
- removeNodeWatcher(ref: string, callBack: Function): void;
57
- /**
58
- * 响应节点变更,通知观察者
59
- * @param ref
60
- * @param node
61
- * @param nodeChangeType
62
- */
63
- notifyNodeWatcher(ref: string, node: VNode.Node, nodeChangeType: NodeChangeType, propertyKey?: string): void;
64
- sleep(node?: VNode.Node): void;
65
- private weakup;
66
- /**
67
- * 销毁
68
- */
69
- destroy(keepalive?: boolean): void;
70
- reParser(asts: AST.Node[], keepalive?: boolean): void;
71
- nodeTransition(node: VNode.Node | undefined, mode: "enter" | "leave", name?: string, callBack?: Function, type?: "transition" | "animation"): boolean;
72
- }
73
- export declare function getFirstElement(node: VNode.Node): VNode.Element | undefined;
74
- export declare function getNodeSupportTransition(node: VNode.Node): {
75
- name: any;
76
- type: any;
77
- } | undefined;
@@ -1,82 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { ObType, ParserTemplate, NodeChangeType } from ".";
3
- import { Watcher } from "../observer/watcher";
4
- import { VNode } from "./vnode";
5
- export declare const FILTERTAG = "Filter";
6
- export declare abstract class IParser<T extends AST.Node, N extends VNode.Node> {
7
- /** ast集合 */
8
- protected ast: T;
9
- /** 数据源 会在component上进行属性新增 */
10
- ob: ObType;
11
- /** 父节点 */
12
- protected parent: VNode.Node;
13
- /** 外部处理(ParserTemplate) */
14
- protected ext: ParserTemplate;
15
- /** 当前转换节点ref标记 */
16
- ref: string;
17
- /** 当前AST解析 所产生的观察者 */
18
- private watchers;
19
- node?: N;
20
- constructor(
21
- /** ast集合 */
22
- ast: T,
23
- /** 数据源 会在component上进行属性新增 */
24
- ob: ObType,
25
- /** 父节点 */
26
- parent: VNode.Node,
27
- /** 外部处理(ParserTemplate) */
28
- ext: ParserTemplate);
29
- /**
30
- * 上游主入口方法(初始化执行)
31
- */
32
- abstract parser(): void;
33
- protected beforeDestroy(keepalive?: boolean): void | boolean;
34
- /**
35
- * 销毁流程
36
- */
37
- destroy(keepalive?: boolean): void;
38
- private destroyOtherData;
39
- /**
40
- * 销毁所有子集VNode
41
- */
42
- protected destroyChildrens(keepalive?: boolean): void;
43
- /**
44
- * 销毁所有子集VNode的watcher,为了防止延迟卸载时,无效通知广播
45
- */
46
- protected destroyChildrensWatcher(nodeItem?: VNode.Node): void;
47
- /**
48
- * 插入自身节点
49
- */
50
- protected appendNode(): void;
51
- protected afterParser(): void;
52
- /**
53
- * 通知节点观察者
54
- * @param type 通知类型
55
- */
56
- protected notifyNodeWatcher(type: NodeChangeType, propertyKey?: string): void;
57
- /**
58
- * 运行表达式方法,并返回运行后的值(不带观察者)
59
- * @param express 表达式 string|function
60
- * @param ob 数据源
61
- * @returns
62
- */
63
- protected runExpress(express: string, ob: any): any;
64
- /**
65
- * 运行表达式方法,并返回运行后的值(带观察者)
66
- * @param express 表达式 string|function
67
- * @param ob 数据源
68
- * @param updateCallBack 更新回调
69
- * @param forceCallBack 是否强制回调
70
- * @returns
71
- */
72
- protected runExpressWithWatcher(express: string | Function, ob: any, updateCallBack: (newVal: any, oldVal: any) => void, forceCallBack?: boolean): any;
73
- /**
74
- * 添加观察者
75
- * @param watcher
76
- */
77
- protected addWatch(watcher: Watcher<any>): void;
78
- /**
79
- * 清空所有观察者
80
- */
81
- protected clearWatchers(): void;
82
- }
@@ -1,86 +0,0 @@
1
- import { VNode } from "./vnode";
2
- import { IComponent } from "@joker.front/ast";
3
- type TransitionType = "transition" | "animation";
4
- export declare namespace Render {
5
- /**
6
- * 注入TagId
7
- */
8
- const IRENDERIOCTAGID: unique symbol;
9
- /**
10
- * 备注:在渲染时执行appendNode,最终执行一次mount挂载
11
- * 不会出现根目录append的场景,因为指令group会优先占位
12
- *
13
- * append 和 remove方法不会存在 parent的参数,因为一次挂载后
14
- * 会存在关系,根据关系直接执行
15
- * 上游调用也无需关心parent,特别是在watch周期内
16
- */
17
- interface IRender {
18
- /**
19
- * 挂载
20
- * @param root 挂载根
21
- * 不限制root类型,为后面做多端兼容
22
- */
23
- mount(root: any): void;
24
- /**
25
- * 添加节点
26
- * @param node NodeInfo
27
- */
28
- appendNode(node: VNode.Node): void;
29
- /**
30
- * 更新节点
31
- * @param node NodeInfo
32
- * @param propertyKey 更新属性名称
33
- */
34
- updateNode(node: VNode.Node, propertyKey?: string): void;
35
- /**
36
- * 删除节点
37
- * @param {VNode.Node} node
38
- * @param {VNode.Node} parent 如果为空则带表root跟节点下集
39
- * @param {boolean} reserveOutPut 是否需要保留out产物
40
- */
41
- removeNode(node: VNode.Node, reserveOutPut?: boolean): void;
42
- /**
43
- * 销毁,卸载DOM并释放变量
44
- */
45
- destroy(): void;
46
- /**
47
- * element节点transition enter
48
- */
49
- elementToEnter(node: VNode.Element, name: string, type?: TransitionType, callBack?: Function): void;
50
- /**
51
- * element节点transition leave
52
- */
53
- elementToLeave(node: VNode.Element, name: string, type?: TransitionType, callBack?: Function): void;
54
- /**
55
- * 触发组件事件
56
- * @param node
57
- * @param eventName
58
- * @returns false 则代表通知广播
59
- */
60
- triggerEvent(node: VNode.Component, eventName: string, e: VNode.Event): void | false;
61
- }
62
- /**
63
- * 默认Render,采用H5-DOM模式进行输出
64
- */
65
- class DomRender implements IRender {
66
- elements: DocumentFragment;
67
- constructor();
68
- mount(root: Element | VNode.Component): void;
69
- appendNode(node: VNode.Node): void;
70
- updateNode(node: VNode.Node, propertyKey?: string | undefined): void;
71
- removeNode(node: VNode.Node, reserveOutPut?: boolean): void;
72
- destroy(): void;
73
- elementToEnter(node: VNode.Element, name: string, type?: TransitionType, callBack?: Function): void;
74
- elementToLeave(node: VNode.Element, name: string, type?: TransitionType, callBack?: Function): void;
75
- triggerEvent(node: VNode.Component<IComponent & Record<string, any>>, _eventName: string, _e: VNode.Event): void | false;
76
- private transitionFrame;
77
- private renderNode;
78
- private initElementEvents;
79
- private parserHtml;
80
- private isCommandGroup;
81
- private appendNodeChildren;
82
- private setAttribute;
83
- }
84
- }
85
- export declare function getTransitionClassName(transition: string, mode: "enter" | "leave", type: "from" | "active" | "to"): string;
86
- export {};
@@ -1,6 +0,0 @@
1
- import { AST } from "@joker.front/ast";
2
- import { IParser } from "./parser";
3
- import { VNode } from "./vnode";
4
- export declare class ParserText extends IParser<AST.Text, VNode.Text> {
5
- parser(): void;
6
- }
@@ -1,182 +0,0 @@
1
- import { AST, IComponent } from "@joker.front/ast";
2
- import { Component as ComponentClass } from "../component";
3
- import { ObType } from ".";
4
- import { SectionType } from "../component";
5
- import { IParser } from "./parser";
6
- /**
7
- * 虚拟DOM
8
- *
9
- * 该控件分类区别于AST,分类是按照实际输出类型作为划分
10
- */
11
- export declare namespace VNode {
12
- const PARSERKEY: unique symbol;
13
- /**
14
- * VNode 基类
15
- */
16
- class Node {
17
- parent?: Node | undefined;
18
- /**
19
- * 是否是静态节点,非动态节点。例如:element、text、comment等
20
- */
21
- static?: boolean;
22
- output?: any;
23
- [PARSERKEY]?: IParser<AST.Node, VNode.Node>;
24
- childrens?: Node[];
25
- /**
26
- * 当前节点是否睡眠
27
- */
28
- sleep: boolean;
29
- constructor(parent?: Node | undefined);
30
- /**
31
- * 上一个节点
32
- */
33
- get prev(): Node | undefined;
34
- /**
35
- * 下一个节点
36
- */
37
- get next(): Node | undefined;
38
- /**
39
- * 匹配第一个符合要求的祖先元素
40
- * @param match
41
- * @param breakWhenVRoot 是否过滤到当前视图根时中断
42
- * @returns
43
- */
44
- closest<T extends VNode.Node = VNode.Node>(filter: (node: VNode.Node) => boolean | void, breakWhenVRoot?: boolean): T | undefined;
45
- /**
46
- * 返回所有匹配的子元素
47
- * @param filter 返回true则记录,返回false则跳过该元素的子集
48
- * @returns
49
- */
50
- find(filter: (node: VNode.Node) => boolean | void, childrens?: Array<VNode.Node>, _out?: Array<VNode.Node>): Array<VNode.Node>;
51
- /**
52
- * 是否包含
53
- * @param filter 返回true则记录,返回false则跳过该元素的子集
54
- * @returns
55
- */
56
- contains(filter: (node: VNode.Node) => boolean | void, childrens?: Array<VNode.Node>): boolean;
57
- }
58
- /**
59
- * 根节点
60
- */
61
- class Root<T extends IComponent = IComponent & Record<string, any>> extends Node {
62
- childrens: Node[];
63
- component: T;
64
- constructor();
65
- }
66
- /**
67
- * 文本类型节点
68
- */
69
- class Text extends Node {
70
- text: string;
71
- static: boolean;
72
- constructor(text: string, parent: Node);
73
- }
74
- /**
75
- * Html节点
76
- */
77
- class Html extends Node {
78
- html: string;
79
- static: boolean;
80
- constructor(html: string, parent: Node);
81
- }
82
- /**
83
- * 注释节点
84
- */
85
- class Comment extends Node {
86
- text: string;
87
- static: boolean;
88
- constructor(text: string, parent: Node);
89
- }
90
- /**
91
- * Element节点
92
- */
93
- class Element extends Node {
94
- tagName: string;
95
- static: boolean;
96
- attributes: Record<string, any>;
97
- transitionTimer?: number;
98
- childrens: Node[];
99
- events: Array<[string, {
100
- modifiers?: string[];
101
- callBack: EventCallBack;
102
- }]>;
103
- /**
104
- * 协助事件存储,用于存储辅助事件,例如outside等事件
105
- */
106
- _assistEventCache?: Array<[string, (e: any) => void]>;
107
- constructor(tagName: string, parent: Node);
108
- }
109
- type Event<T = undefined> = {
110
- /**
111
- * 事件名称
112
- */
113
- eventName: string;
114
- /**
115
- * 原生event,对应运行平台
116
- */
117
- event?: any;
118
- /** 触发事件目标元素 */
119
- target?: Node;
120
- /** 阻止默认事件 */
121
- preventDefault(): void;
122
- /** 阻止事件传播 */
123
- stopPropagation(): void;
124
- /** 参数 */
125
- data: T;
126
- };
127
- type EventCallBack<T = any> = (e: Event<T>) => void;
128
- /**
129
- * 组件节点
130
- */
131
- class Component<T extends IComponent = IComponent & Record<string, any>> extends Node {
132
- name?: string;
133
- transitionTimer?: number;
134
- component: T;
135
- events: Array<[string, {
136
- modifiers?: string[];
137
- callBack: EventCallBack;
138
- }]>;
139
- propValues: Record<string, any>;
140
- keepalive?: boolean;
141
- /**
142
- * 当前组件第一个element vnode
143
- */
144
- get firstElement(): Element | undefined;
145
- private findElement;
146
- }
147
- /**
148
- * 条件节点
149
- */
150
- class Condition extends Node {
151
- cmdName: AST.IfCommand["kind"];
152
- result: boolean;
153
- childrens: Node[];
154
- isShow: boolean;
155
- constructor(cmdName: AST.IfCommand["kind"], parent: Node);
156
- }
157
- /**
158
- * 列表节点,内部包含多组列表项
159
- */
160
- class List extends Node {
161
- childrens: ListItem[];
162
- }
163
- /**
164
- * 循环列表项
165
- */
166
- class ListItem extends Node {
167
- ob: ObType;
168
- childrens: Node[];
169
- constructor(ob: ObType, parent: VNode.Node);
170
- }
171
- /**
172
- * 插槽节点
173
- */
174
- class RenderSection extends Node {
175
- id: string;
176
- params: any[];
177
- section?: SectionType;
178
- childrens: Node[];
179
- ob?: ComponentClass & Record<string, any>;
180
- constructor(idOrSection: string | SectionType, parent: Node);
181
- }
182
- }