@fox-js/fox 3.0.1-3 → 3.0.1-31

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.
@@ -1,1880 +1,1859 @@
1
- import { Ref, ComponentInternalInstance, InjectionKey, App, ComponentPublicInstance } from 'vue';
2
-
3
- declare const idKey: unique symbol;
4
- declare const valueKey: unique symbol;
5
- declare const childrenKey: unique symbol;
6
- declare const growKey: unique symbol;
7
- /**
8
- * tree node
9
- */
10
- interface TreeNode {
11
- [propName: string]: any;
12
- [idKey]: string;
13
- [valueKey]: any;
14
- [growKey]: boolean;
15
- [childrenKey]: Map<string, TreeNode>;
16
- }
17
- /**
18
- * tree接口
19
- */
20
- interface Tree extends TreeNode {
21
- /**
22
- * 加入数据
23
- * @param args
24
- * @returns {boolean}
25
- */
26
- put(...args: any[]): boolean;
27
- /**
28
- * 获取内容
29
- * @param args
30
- * @returns {any}
31
- */
32
- get(...args: any[]): any | undefined;
33
- /**
34
- * 移除数据
35
- * @param args
36
- * @returns {boolean}
37
- */
38
- remove(...args: any[]): boolean;
39
- /**
40
- * 判断是否包含数据
41
- * @param args
42
- * @returns {boolean}
43
- */
44
- contains(...args: any[]): boolean;
45
- /**
46
- * 清空所以数据
47
- */
48
- clear(): void;
49
- }
50
- /**
51
- * 导出Bus
52
- */
53
- declare let Bus: any;
54
-
55
- /**
56
- * 更新类型
57
- */
58
- declare enum UpdateType {
59
- /**
60
- * 部分替换
61
- */
62
- Part = 0,
63
- /**
64
- * 整体替换
65
- */
66
- All = 1
67
- }
68
-
69
- /**
70
- * 操作类型
71
- * @type {Enum}
72
- */
73
- declare enum OperationType {
74
- /**
75
- * Push策略(生产历史记录)
76
- */
77
- Push = 0,
78
- /**
79
- * 替换策略(替换当前历史记录)
80
- */
81
- Replace = 1,
82
- /**
83
- * 修改策略(不影响历史记录)
84
- */
85
- Put = 2,
86
- /**
87
- * 增加策略(生成历史记录)
88
- */
89
- Append = 3,
90
- /**
91
- * 打开策略,如果不存在则打开,否则切换(生成历史记录)
92
- */
93
- Open = 4
94
- }
95
-
96
- /**
97
- * 路由配置
98
- */
99
- interface RouteConfig {
100
- /**
101
- * 路径
102
- */
103
- path?: string;
104
- /**
105
- * 名称
106
- */
107
- name?: string;
108
- /**
109
- * 转发路径
110
- */
111
- redirect?: string;
112
- /**
113
- * 组件
114
- */
115
- component?: any;
116
- /**
117
- * 组件映射
118
- */
119
- components?: {
120
- [propName: string]: any;
121
- };
122
- /**
123
- * 孩子节点
124
- */
125
- children?: any[];
126
- /**
127
- * 属性
128
- */
129
- props?: Record<string | number | symbol, any> | boolean | {
130
- (route: Route): any;
131
- };
132
- /**
133
- * 元数据
134
- */
135
- meta?: Record<string | number | symbol, any>;
136
- }
137
- /**
138
- * 插槽
139
- */
140
- declare class Slot {
141
- /**
142
- * 插槽名称
143
- */
144
- name: string;
145
- /**
146
- * 层次
147
- */
148
- level: number;
149
- /**
150
- * root插槽节点名称
151
- */
152
- rootName: string | undefined;
153
- /**
154
- * root插槽节点index
155
- */
156
- rootIndex: number;
157
- /**
158
- * 构造函数
159
- * @param name
160
- * @param level
161
- * @param rootName
162
- */
163
- constructor(name: string, level: number, rootName: string | undefined, rootIndex: number);
164
- }
165
- declare class Session {
166
- /**
167
- * 目标路由
168
- */
169
- to?: Route;
170
- /**
171
- * 目标路由
172
- */
173
- routeModel?: RouteModel;
174
- /**
175
- * 来源路由
176
- */
177
- from?: Route;
178
- /**
179
- * 流程数据
180
- */
181
- data: {
182
- [propName: string]: any;
183
- };
184
- /**
185
- * 构造函数
186
- * @param to
187
- * @param from
188
- */
189
- constructor(to?: Route, from?: Route);
190
- /**
191
- * 转换为session
192
- * @param src
193
- * @returns
194
- */
195
- static from(src: {
196
- [propName: string]: any;
197
- }): Session;
198
- }
199
- /**
200
- * 路由(跳转目标)
201
- */
202
- declare class Route {
203
- /**
204
- * 路径
205
- */
206
- path?: string;
207
- /**
208
- * 返回full path
209
- */
210
- get fullPath(): string;
211
- /**
212
- * 名称
213
- */
214
- name?: string;
215
- /**
216
- * 嵌入root节点
217
- */
218
- root?: string;
219
- /**
220
- * 参数
221
- */
222
- params?: Record<string | number | symbol, any>;
223
- /**
224
- * 查询
225
- */
226
- query?: any;
227
- /**
228
- * 获取匹配的元数组列表
229
- */
230
- matched?: {
231
- meta: Record<string | number | symbol, any>;
232
- }[];
233
- /**
234
- * route本身的元数据
235
- */
236
- meta?: Record<string | number | symbol, any>;
237
- /**
238
- * 成功回调函数
239
- */
240
- success?: {
241
- (...arg: any[]): void;
242
- };
243
- /**
244
- * 失败回调函数
245
- */
246
- error?: {
247
- (...arg: any[]): void;
248
- };
249
- /**
250
- * 页面销毁回答函数
251
- */
252
- destroy?: {
253
- (...arg: any[]): void;
254
- };
255
- /**
256
- * 操作类型(Push, Replace, Put, Append)
257
- */
258
- opsType?: OperationType;
259
- /**
260
- * 更新类型(All,Part)
261
- */
262
- updateType?: UpdateType;
263
- /**
264
- * view属性集合(用于multi view的tab view属性)
265
- */
266
- viewTagAttrs?: any;
267
- /**
268
- * 索引(用于opsType为Append的情况下,可以精确卸载的需求)
269
- */
270
- index?: number;
271
- /**
272
- * 是否激活状态(用于多视图,Open操作的情况下,标志view是否为激活状态)
273
- */
274
- active?: boolean;
275
- /**
276
- * 插槽(用于历史还原)
277
- */
278
- slot?: Slot;
279
- /**
280
- * session(router执行链路session)
281
- */
282
- session?: Session;
283
- /**
284
- * 克隆
285
- * @param target
286
- * @param plain 是否只克隆plain对象
287
- */
288
- static clone(target: Route, plain: boolean): Route;
289
- /**
290
- * 判断路由是否相同
291
- * @param x
292
- * @param y
293
- * @returns
294
- */
295
- static isSame(x: Route, y: Route): boolean;
296
- /**
297
- * 判断路由对应的route model是否一致
298
- * @param x
299
- * @param y
300
- * @returns
301
- */
302
- static isSameForRouteModel(x: Route, y: Route): boolean;
303
- /**
304
- * 由对象生成路由
305
- * @param obj
306
- * @returns
307
- */
308
- static from(obj: any): Route;
309
- }
310
- /**
311
- * model (RouteModel > ModelLayer > Model)
312
- */
313
- declare class Model {
314
- /**
315
- * 唯一ID(用于区分model)
316
- */
317
- id: number;
318
- /**
319
- * 名称
320
- */
321
- name: string;
322
- /**
323
- * 属性
324
- */
325
- props: Record<string | number | symbol, any> | boolean | {
326
- (route: Route): any;
327
- } | undefined;
328
- /**
329
- * 元数据
330
- */
331
- meta?: Record<string | number | symbol, any>;
332
- /**
333
- * 原始组件数据
334
- */
335
- src: any;
336
- /**
337
- * 组件(解析后组件)
338
- */
339
- component: any;
340
- /**
341
- * 构造函数
342
- *
343
- * @param name
344
- * @param src
345
- * @param props
346
- * @param meta
347
- */
348
- constructor(name: string, src: any, props?: Record<string | number | symbol, any> | {
349
- (route: Route): any;
350
- } | boolean, meta?: Record<string | number | symbol, any>);
351
- /**
352
- * 是否已经解析完成
353
- */
354
- get isResolved(): boolean;
355
- /**
356
- * 解析组件
357
- */
358
- resolve(): Promise<void>;
359
- }
360
- /**
361
- * 层(RouteModel > ModelLayer > Model)
362
- */
363
- declare class ModelLayer {
364
- /**
365
- * 节点
366
- */
367
- models: Model[];
368
- }
369
- /**
370
- * Route Model(RouteModel > ModelLayer > Model)
371
- */
372
- declare class RouteModel {
373
- /**
374
- * 路径
375
- */
376
- path?: string;
377
- /**
378
- * 路径match
379
- */
380
- match: any;
381
- /**
382
- * 转发路径
383
- */
384
- redirect?: string;
385
- /**
386
- * 名称
387
- */
388
- name?: string;
389
- /**
390
- * layer集合
391
- */
392
- layers: ModelLayer[];
393
- }
394
-
395
- declare const rootKey: unique symbol;
396
- declare const rootNodeKey: unique symbol;
397
- declare const parentNodeKey: unique symbol;
398
- declare const nameKey: unique symbol;
399
- /**
400
- * model插槽
401
- */
402
- declare class ModelSlot {
403
- /**
404
- * 实例
405
- */
406
- instance: ComponentInternalInstance | null;
407
- /**
408
- * model
409
- */
410
- model: Model;
411
- /**
412
- * route
413
- */
414
- route: Route | null;
415
- /**
416
- * 是否激活状态
417
- */
418
- active: boolean;
419
- /**
420
- * 索引
421
- */
422
- index: number;
423
- /**
424
- * 构造函数
425
- * @param route
426
- * @param model
427
- * @param index
428
- * @param active
429
- */
430
- constructor(route: Route | null, model: Model, index?: number, active?: boolean);
431
- }
432
- /**
433
- * 视图
434
- */
435
- declare class View {
436
- private scope;
437
- /**
438
- * 设置补偿函数
439
- */
440
- set compensation(func: {
441
- (): boolean;
442
- });
443
- /**
444
- * model slots列表
445
- */
446
- private _slots?;
447
- /**
448
- * getter for models
449
- */
450
- get slots(): Ref<ModelSlot[]>;
451
- /**
452
- * 是否为空视图
453
- */
454
- get empty(): boolean;
455
- /**
456
- * name
457
- */
458
- [nameKey]: string;
459
- /**
460
- * 是否分支根节点标志(true/false)
461
- */
462
- [rootKey]: boolean;
463
- /**
464
- * view的所在的root(最近一个)
465
- */
466
- [rootNodeKey]: ViewPlace | null;
467
- /**
468
- * view的父亲记得引用(会在router的[sync]方法中建立关系)
469
- */
470
- [parentNodeKey]: ViewPlace | null;
471
- /**
472
- * 名称
473
- */
474
- get name(): string;
475
- /**
476
- * 构造函数
477
- * @param name
478
- * @param isRoot
479
- * @param rootNodeRef
480
- */
481
- constructor(name: string, isRoot: boolean, rootNodeRef?: ViewPlace | null);
482
- }
483
- /**
484
- * view place
485
- */
486
- declare class ViewPlace {
487
- /**
488
- * view
489
- */
490
- view: View;
491
- /**
492
- * 索引
493
- */
494
- index: number;
495
- /**
496
- * 层次
497
- */
498
- level: number;
499
- /**
500
- * 构造函数
501
- * @param view
502
- * @param index
503
- * @param level
504
- */
505
- constructor(view: View, index: number, level: number);
506
- /**
507
- * 判断是否在队列中
508
- * @param list
509
- * @param view
510
- */
511
- static include(list: ViewPlace[], viewPlace: ViewPlace): boolean;
512
- }
513
- /**
514
- *
515
- */
516
- declare class Layer {
517
- /**
518
- * 节点(view集合)
519
- */
520
- views: View[];
521
- }
522
- /**
523
- * page
524
- */
525
- declare class Page {
526
- /**
527
- *
528
- */
529
- layers: Layer[];
530
- }
531
-
532
- /**
533
- * 操作类型
534
- * @type {Enum}
535
- */
536
- declare enum ModuleStatus {
537
- /**
538
- * 加载中
539
- */
540
- Loading = 0,
541
- /**
542
- * 加载完成
543
- */
544
- Loaded = 1,
545
- /**
546
- * 定义中状态
547
- */
548
- Defining = 2,
549
- /**
550
- * 定义完成状态
551
- */
552
- Defined = 3
553
- }
554
-
555
- /**
556
- * Session类型
557
- */
558
- interface EventChainSession {
559
- [propName: string]: any;
560
- }
561
- /**
562
- * event chain 上下文
563
- */
564
- interface EventChainContext {
565
- /**
566
- * 任务跳转
567
- */
568
- go: {
569
- (step: number, ...args: any[]): void;
570
- };
571
- /**
572
- * 触发链路
573
- */
574
- resolve: {
575
- (...args: any[]): void;
576
- };
577
- /**
578
- * 中断链路
579
- */
580
- reject: {
581
- (...args: any[]): void;
582
- };
583
- /**
584
- * 插入任务
585
- */
586
- insert: {
587
- (...args: any[]): void;
588
- };
589
- /**
590
- * chain session
591
- */
592
- session: EventChainSession;
593
- }
594
- /**
595
- * Task类型
596
- */
597
- interface Task {
598
- (context: EventChainContext, ...args: any[]): void;
599
- }
600
- /**
601
- * 完成Task类型(Exception,Finish, Wait)
602
- */
603
- interface EndTask {
604
- (context: {
605
- session: EventChainSession;
606
- }, ...args: any[]): void;
607
- }
608
- declare const chainKey: unique symbol;
609
- declare const cursorKey: unique symbol;
610
- declare const persistentModeKey: unique symbol;
611
- declare const statusKey: unique symbol;
612
- declare const argsKey: unique symbol;
613
- declare const exArgsKey: unique symbol;
614
- declare const successFnsKey: unique symbol;
615
- declare const errorFnsKey: unique symbol;
616
- declare const sessionKey: unique symbol;
617
- declare const _go: unique symbol;
618
- /**
619
- * 任务链路
620
- */
621
- declare class EventChain {
622
- /**
623
- * 事件链路
624
- */
625
- private [chainKey];
626
- /**
627
- * 游标
628
- */
629
- private [cursorKey];
630
- /**
631
- * 是否持久模式(该状态为true的情况,已经执行的任务会继续保存在队列中)
632
- */
633
- private [persistentModeKey];
634
- /**
635
- * 状态
636
- */
637
- private [statusKey];
638
- /**
639
- * 参数
640
- */
641
- private [argsKey];
642
- /**
643
- * 异常参数
644
- */
645
- private [exArgsKey];
646
- /**
647
- * 移除函数
648
- */
649
- private [successFnsKey];
650
- /**
651
- * 错误函数
652
- */
653
- private [errorFnsKey];
654
- /**
655
- * 链路session
656
- */
657
- private [sessionKey]?;
658
- /**
659
- * 获取session
660
- */
661
- get session(): EventChainSession | undefined;
662
- /**
663
- * 构造函数
664
- *
665
- * @param session
666
- * @param persistentMode
667
- */
668
- constructor(session?: EventChainSession, persistentMode?: boolean);
669
- /**
670
- * 触发链路的下一个任务
671
- * @param step
672
- * @param params
673
- */
674
- private [_go];
675
- /**
676
- * 跳转
677
- * @param step
678
- * @param params
679
- */
680
- go(step: number, ...params: any[]): EventChain;
681
- /**
682
- * 结束事件链调用,直接触发wait函数(success方法)
683
- * @param params
684
- */
685
- finish(...params: any[]): EventChain;
686
- /**
687
- * 结束事件链调用,直接触发wait函数(error方法)
688
- * @param params
689
- */
690
- reject(...params: any[]): EventChain;
691
- /**
692
- * 结束事件链调用,直接触发error函数
693
- * @param params
694
- */
695
- throw(...params: any[]): EventChain;
696
- /**
697
- * 重置事件链,直接触发wait函数
698
- * @param params
699
- */
700
- reset(...params: any[]): EventChain;
701
- /**
702
- * 加入任务
703
- * @param task
704
- * @returns {EventChain}
705
- */
706
- post(task: Task): EventChain;
707
- /**
708
- * 加入等待任务
709
- * @param successFn
710
- * @param errorFn
711
- * @returns
712
- */
713
- wait(successFn: EndTask, errorFn: EndTask): EventChain;
714
- /**
715
- * 加入异常处理任务
716
- * @param errorFn
717
- * @returns
718
- */
719
- exception(errorFn: EndTask): EventChain;
720
- /**
721
- * 判断事件链是否已经执行完成
722
- * @returns {boolean}
723
- */
724
- isFinish(): boolean;
725
- }
726
-
727
- /**
728
- * AMD加载器
729
- */
730
- declare class Require {
731
- /**
732
- * head对象
733
- */
734
- private head;
735
- /**
736
- * 是否为老的webkit浏览器
737
- */
738
- private isOldWebKit;
739
- /**
740
- * moudel manager
741
- * @type {ModuleManager}
742
- */
743
- private moduleManager;
744
- /**
745
- * resource
746
- */
747
- private resource;
748
- /**
749
- * 参数配置
750
- */
751
- private options;
752
- /**
753
- * 设置query
754
- */
755
- private _query?;
756
- /**
757
- * 设置query
758
- */
759
- set query(val: Record<string, string | number> | undefined);
760
- /**
761
- * 获取query
762
- */
763
- get query(): Record<string, string | number> | undefined;
764
- /**
765
- * 构造函数
766
- */
767
- constructor(options?: any);
768
- /**
769
- * 加载
770
- */
771
- ensure(...args: any[]): Require;
772
- /**
773
- * 卸载
774
- */
775
- remove(...args: any): Require;
776
- /**
777
- * 加载
778
- *
779
- * @param chain
780
- * @param taskNode
781
- */
782
- mount(chain: EventChain, taskNode: TaskNode): void;
783
- /**
784
- * 加载html
785
- *
786
- * @param chain
787
- * @param task
788
- * @param point
789
- */
790
- private mountHTML;
791
- /**
792
- * 加载css
793
- * @param chain
794
- * @param task
795
- * @param point
796
- */
797
- private mountCSS;
798
- /**
799
- * 加载js
800
- *
801
- * @param chain
802
- * @param task
803
- * @param point
804
- */
805
- private mountJS;
806
- /**
807
- * 卸载资源
808
- */
809
- unmount(path: string, options?: any): void;
810
- /**
811
- * 去掉空元素
812
- */
813
- private trimEmptyElement;
814
- /**
815
- * 创建define函数
816
- * @param module
817
- * @param task
818
- * @returns {Function}
819
- */
820
- private createDefine;
821
- /**
822
- * 解析路径
823
- * @param uri
824
- * @returns {string}
825
- */
826
- private resolvePath;
827
- /**
828
- * 创建search字符串
829
- */
830
- private createSearch;
831
- /**
832
- * 获取文件名后缀
833
- * @param name
834
- * @returns {string}
835
- */
836
- getFileNamePostfix(name: string): string;
837
- /**
838
- * 是否为不处理的路径
839
- * @param uri
840
- * @param type
841
- * @returns {boolean}
842
- */
843
- private isNaturePath;
844
- /**
845
- * 解析路径
846
- * @param uri
847
- * @param replace
848
- */
849
- private parserPath;
850
- }
851
- /**
852
- * 进程
853
- */
854
- declare class Progress {
855
- /**
856
- * 回调函数
857
- */
858
- private callback;
859
- /**
860
- * values
861
- */
862
- private values;
863
- /**
864
- * 状态
865
- */
866
- private status;
867
- /**
868
- * 工作量
869
- */
870
- private size;
871
- /**
872
- * 最新的index
873
- */
874
- private lastIndex;
875
- /**
876
- * 构造函数
877
- */
878
- constructor(size: number, callback: {
879
- (status: ModuleStatus, values: any[]): void;
880
- });
881
- /**
882
- * work
883
- * @param status 工作状态(true/false)
884
- * @param index
885
- * @param value
886
- */
887
- work(status: boolean, index: number, value: any): void;
888
- /**
889
- * 判断进程是否为正常状态
890
- */
891
- isOK(): boolean;
892
- }
893
- /**
894
- * 任务节点
895
- */
896
- declare class TaskNode {
897
- /**
898
- * 索引
899
- */
900
- index: number;
901
- /**
902
- * 来源
903
- */
904
- src: string;
905
- /**
906
- * 参数
907
- */
908
- params: any;
909
- /**
910
- * 进程
911
- */
912
- progress: Progress;
913
- /**
914
- * 构造函数
915
- * @param index
916
- * @param src
917
- * @param params
918
- * @param progress
919
- */
920
- constructor(index: number, src: string, params: any, progress: Progress);
921
- }
922
-
923
- declare class MarkRecord {
924
- currentRoute: Route;
925
- routes: Array<Route>;
926
- /**
927
- * 构造函数
928
- * @param currentRoute
929
- * @param routes
930
- */
931
- constructor(currentRoute: Route, routes: Array<Route>);
932
- }
933
- /**
934
- * history change handler
935
- */
936
- interface HistoryChangeHandler {
937
- (args: Array<Route> | string): void;
938
- }
939
- /**
940
- * Router History
941
- */
942
- interface RouterHistory {
943
- /**
944
- * 基础路径
945
- */
946
- base: string;
947
- /**
948
- * 是否监听history change
949
- */
950
- historyMonitor: boolean;
951
- /**
952
- * 是否支持无痕模式
953
- */
954
- traceless: boolean;
955
- /**
956
- * 初始化
957
- * @param firstNavigate
958
- * @returns
959
- */
960
- init(firstNavigate: boolean): Promise<void>;
961
- /**
962
- * 销毁
963
- */
964
- destroy(): void;
965
- /**
966
- * 监听历史记录改变
967
- * @param handler
968
- */
969
- listen(handler: HistoryChangeHandler): void;
970
- /**
971
- * 跳转
972
- * @param n
973
- */
974
- go(n: number): void;
975
- /**
976
- * 加入记录
977
- * @param record
978
- */
979
- push(record: MarkRecord): void;
980
- /**
981
- * 替换当前记录
982
- * @param record
983
- */
984
- replace(record: MarkRecord): void;
985
- }
986
-
987
- declare const sync: unique symbol;
988
- declare const resolveRoute: unique symbol;
989
-
990
- /**
991
- * router options
992
- */
993
- interface RouterOptions {
994
- /**
995
- * 默认操作类型
996
- */
997
- defaultOperationType?: OperationType;
998
- /**
999
- * 模块路径解释
1000
- */
1001
- modulePathResolve?: {
1002
- (route: Route): string;
1003
- };
1004
- /**
1005
- * router history
1006
- */
1007
- history?: RouterHistory;
1008
- /**
1009
- * 路由配置列表
1010
- */
1011
- routes?: RouteConfig[];
1012
- /**
1013
- * not found 路由
1014
- */
1015
- notFound?: RouteConfig;
1016
- /**
1017
- * not found 路由路径
1018
- */
1019
- notFoundPath?: string;
1020
- }
1021
- /**
1022
- * before route update filter
1023
- */
1024
- interface BeforeRouteFilter {
1025
- (to: Route, from: Route, next: {
1026
- (pass?: boolean | Route): void;
1027
- }, session: Record<string | number | symbol, any>): void;
1028
- }
1029
- /**
1030
- * after route update filter
1031
- */
1032
- interface AfterRouteFilter {
1033
- (to: Route, from: Route, session: Record<string | number | symbol, any>): void;
1034
- }
1035
- /**
1036
- * destroy route update filter
1037
- */
1038
- interface DestroyRouteFilter {
1039
- (to: Route, session: Record<string | number | symbol, any>): void;
1040
- }
1041
- declare const _constructRouteModel: unique symbol;
1042
- declare const _findRouteModel: unique symbol;
1043
- declare const _findRootView: unique symbol;
1044
- declare const _getFirstView: unique symbol;
1045
- declare const _removeView: unique symbol;
1046
- declare const _buildPage: unique symbol;
1047
- declare const _resolveComponent: unique symbol;
1048
- declare const _update: unique symbol;
1049
- declare const _merge: unique symbol;
1050
- declare const ignoreHistoryChangeOnceKey: unique symbol;
1051
- declare const _handleHistoryChange: unique symbol;
1052
- declare const _handleRouteUpated: unique symbol;
1053
- declare const routeUpdatedCallback: unique symbol;
1054
- declare const currentRoutes: unique symbol;
1055
- declare const currentKey: unique symbol;
1056
- declare const _addRouteRecorder: unique symbol;
1057
- declare const _removeRouteRecorder: unique symbol;
1058
- declare const _cloneRouteRecorder: unique symbol;
1059
- declare const _handleError: unique symbol;
1060
- declare const errorCallback: unique symbol;
1061
- declare const registerKey$1: unique symbol;
1062
- declare const notFoundKey: unique symbol;
1063
- declare const notFoundPathKey: unique symbol;
1064
- declare const forestKey: unique symbol;
1065
- declare const historyKey: unique symbol;
1066
- declare const beforeFiltersKey: unique symbol;
1067
- declare const afterFiltersKey: unique symbol;
1068
- declare const destroyFiltersKey: unique symbol;
1069
- declare const mainDispatcherKey: unique symbol;
1070
- declare const initKey: unique symbol;
1071
- declare const requireKey: unique symbol;
1072
- declare const readyKey: unique symbol;
1073
- declare const readyHandlersKey: unique symbol;
1074
- declare const _markReady: unique symbol;
1075
- declare const _createNextFn: unique symbol;
1076
- declare const _start: unique symbol;
1077
- declare const _before: unique symbol;
1078
- declare const _after: unique symbol;
1079
- declare const _destroy: unique symbol;
1080
- declare const _load: unique symbol;
1081
- declare const _unload: unique symbol;
1082
- declare const _loadDependency: unique symbol;
1083
- declare const resolvedModulesKey: unique symbol;
1084
- declare const resolveDependencyKey: unique symbol;
1085
- declare const routerGuardKey: unique symbol;
1086
- declare class Router {
1087
- /**
1088
- * 注册表
1089
- */
1090
- private [registerKey$1];
1091
- /**
1092
- * not found route
1093
- */
1094
- private [notFoundKey]?;
1095
- /**
1096
- * not found route path
1097
- */
1098
- private [notFoundPathKey];
1099
- /**
1100
- * ready
1101
- */
1102
- private [readyKey];
1103
- /**
1104
- * ready handlers
1105
- */
1106
- private [readyHandlersKey];
1107
- /**
1108
- * 页面根节点
1109
- */
1110
- private [forestKey];
1111
- /**
1112
- * 历史记录控制器
1113
- */
1114
- private [historyKey]?;
1115
- /**
1116
- * 当前路由集合
1117
- */
1118
- private [currentRoutes];
1119
- /**
1120
- * 错误回调
1121
- */
1122
- private [errorCallback];
1123
- /**
1124
- * 全局route更新监听器
1125
- */
1126
- private [routeUpdatedCallback];
1127
- /**
1128
- * before过滤器队列
1129
- */
1130
- private [beforeFiltersKey];
1131
- /**
1132
- * after过滤器队列
1133
- */
1134
- private [afterFiltersKey];
1135
- /**
1136
- * destroy过滤器队列
1137
- */
1138
- private [destroyFiltersKey];
1139
- /**
1140
- * 主任务分发器
1141
- */
1142
- private [mainDispatcherKey];
1143
- /**
1144
- * 已解析模块集合
1145
- */
1146
- private [resolvedModulesKey];
1147
- /**
1148
- * 解析依赖函数
1149
- */
1150
- private [resolveDependencyKey];
1151
- /**
1152
- * 路由守护者
1153
- */
1154
- private [routerGuardKey];
1155
- /**
1156
- * 是否初始化
1157
- */
1158
- private [initKey];
1159
- /**
1160
- * 当前最新路由
1161
- */
1162
- private [currentKey];
1163
- /**
1164
- * 创建require
1165
- */
1166
- private [requireKey];
1167
- get require(): Require | null;
1168
- /**
1169
- * 获取当前最新route
1170
- */
1171
- get current(): Route | null;
1172
- private options;
1173
- /**
1174
- * 构造函数
1175
- * @param options
1176
- */
1177
- constructor(options: RouterOptions);
1178
- /**
1179
- * 记录错误日志
1180
- * @param error
1181
- * @param route
1182
- */
1183
- private [_handleError];
1184
- /**
1185
- * 初始化
1186
- */
1187
- init(): void;
1188
- /**
1189
- * 第一次导航是否完成
1190
- */
1191
- isReady(): Promise<void>;
1192
- /**
1193
- * 设置第一导航完成
1194
- */
1195
- private [_markReady];
1196
- /**
1197
- * 是否忽略历史记录改变
1198
- * @type {boolean}
1199
- */
1200
- private [ignoreHistoryChangeOnceKey];
1201
- /**
1202
- * 处理历史记录
1203
- * @param record
1204
- */
1205
- private [_handleHistoryChange];
1206
- /**
1207
- * 处理route updated事件
1208
- * @param route
1209
- */
1210
- private [_handleRouteUpated];
1211
- /**
1212
- * 加入路由记录
1213
- * @param route
1214
- */
1215
- private [_addRouteRecorder];
1216
- /**
1217
- * 克隆路由记录
1218
- * @returns
1219
- */
1220
- private [_cloneRouteRecorder];
1221
- /**
1222
- * 移除路由记录
1223
- *
1224
- * @param route
1225
- */
1226
- private [_removeRouteRecorder];
1227
- /**
1228
- * 设置history monitor是否启动
1229
- */
1230
- set hisotryMonitor(val: boolean);
1231
- /**
1232
- * 获取history minitor
1233
- */
1234
- get historyMonitor(): boolean;
1235
- /**
1236
- * 设置无痕模式,不改变历史记录
1237
- */
1238
- set traceless(val: boolean);
1239
- /**
1240
- * 获取无痕模式(不改变历史记录)
1241
- */
1242
- get traceless(): boolean;
1243
- /**
1244
- * 注册route updated处理函数
1245
- * @param callback
1246
- */
1247
- onRouteUpdated(callback: {
1248
- (route?: Route | null): void;
1249
- } | null): void;
1250
- /**
1251
- * 注册全局异常处理函数
1252
- * @param callback
1253
- */
1254
- onError(callback: {
1255
- (...args: any[]): void;
1256
- } | null): void;
1257
- /**
1258
- * 添加before filter
1259
- * @param filter
1260
- */
1261
- beforeEach(filter: BeforeRouteFilter): void;
1262
- /**
1263
- * 移除before filter
1264
- * @param filter
1265
- */
1266
- removeBeforeEach(filter: BeforeRouteFilter): boolean;
1267
- /**
1268
- * 添加after filter
1269
- * @param filter
1270
- */
1271
- afterEach(filter: AfterRouteFilter): void;
1272
- /**
1273
- * 移除after filter
1274
- * @param filter
1275
- * @returns
1276
- */
1277
- removeAfterEach(filter: AfterRouteFilter): boolean;
1278
- /**
1279
- * 添加destroy filter
1280
- * @param filter
1281
- */
1282
- destroyEach(filter: DestroyRouteFilter): void;
1283
- /**
1284
- * 移除after filter
1285
- * @param filter
1286
- * @returns
1287
- */
1288
- removeDestroyEach(filter: DestroyRouteFilter): boolean;
1289
- /**
1290
- * 设置依赖模块解释函数
1291
- * @param resolveDependency
1292
- */
1293
- setResolveDependency(resolveDependency: {
1294
- (route: Route): string;
1295
- }): void;
1296
- /**
1297
- * 加入路由配置列表
1298
- * @param routeConfigs
1299
- */
1300
- addRoutes(routeConfigs: RouteConfig[]): void;
1301
- /**
1302
- * 加入路由配置
1303
- * @param routeConfig
1304
- * @param index
1305
- */
1306
- addRoute(routeConfig: RouteConfig, index?: number): void;
1307
- /**
1308
- * 移除路由
1309
- *
1310
- * @param route
1311
- */
1312
- removeRoute(route: Route | string): boolean;
1313
- /**
1314
- * 判断路由是否存在
1315
- *
1316
- * @param route
1317
- */
1318
- hasRoute(route: Route | string): boolean;
1319
- /**
1320
- * 配置not found路由路径
1321
- * @param path
1322
- */
1323
- setNotFoundPath(path: string): void;
1324
- /**
1325
- * 配置not found路由配置
1326
- * @param routeConfig
1327
- */
1328
- setNotFoundRoute(routeConfig: RouteConfig): void;
1329
- /**
1330
- * 返回目前加载的routes
1331
- */
1332
- getRoutes(): RouteModel[];
1333
- /**
1334
- * 根据路由构建route model
1335
- *
1336
- * @param routeConfig
1337
- */
1338
- private [_constructRouteModel];
1339
- /**
1340
- * 查找route model
1341
- * @param cite
1342
- */
1343
- private [_findRouteModel];
1344
- /**
1345
- * 解释路由
1346
- * @param args
1347
- * @returns
1348
- */
1349
- [resolveRoute](args: any): Route | null;
1350
- /**
1351
- * 路由跳转(operation类型为Push)
1352
- * @param args
1353
- */
1354
- push(...args: any[]): Router;
1355
- /**
1356
- * 路由跳转(operation类型为Put)
1357
- * @param args
1358
- */
1359
- put(...args: any[]): Router;
1360
- /**
1361
- * 路由跳转(operation类型为Replace)
1362
- * @param args
1363
- */
1364
- replace(...args: any[]): Router;
1365
- /**
1366
- * 路由跳转(operation类型为Append)
1367
- * @param args
1368
- */
1369
- append(...args: any[]): Router;
1370
- /**
1371
- * 移除
1372
- * @param term
1373
- */
1374
- remove(term?: any): Promise<boolean>;
1375
- /**
1376
- * 路由跳转(operation类型为Open)
1377
- * @param args
1378
- */
1379
- open(...args: any[]): Router;
1380
- /**
1381
- * 关闭路由跳转的页面
1382
- * @param args
1383
- */
1384
- close(args: any): Router;
1385
- /**
1386
- * 路由跳转
1387
- * @param args
1388
- */
1389
- to(...args: any[]): Router;
1390
- /**
1391
- * 历史回退
1392
- * @param n
1393
- */
1394
- back(n?: number): void;
1395
- /**
1396
- * 创建next函数
1397
- */
1398
- private [_createNextFn];
1399
- /**
1400
- * 开始链路
1401
- * @param route
1402
- * @returns {EventChain}
1403
- */
1404
- private [_start];
1405
- /**
1406
- * 执行before事件
1407
- * @param chain
1408
- */
1409
- private [_before];
1410
- /**
1411
- * 执行after事件
1412
- * @param chain
1413
- */
1414
- private [_after];
1415
- /**
1416
- * 执行销毁事件
1417
- */
1418
- private [_destroy];
1419
- /**
1420
- * 加载依赖模块
1421
- * @param chain
1422
- * @param depencies
1423
- */
1424
- private [_loadDependency];
1425
- /**
1426
- * 加载路由
1427
- * @param route
1428
- */
1429
- private [_load];
1430
- /**
1431
- * 卸载(只能用于卸载多视图上的view)
1432
- *
1433
- * @param routes
1434
- */
1435
- private [_unload];
1436
- /**
1437
- * 查找root view索引
1438
- * @param route
1439
- */
1440
- private [_findRootView];
1441
- /**
1442
- * 查找first view
1443
- * @param route
1444
- */
1445
- private [_getFirstView];
1446
- /**
1447
- * 移除view
1448
- * @param page
1449
- * @param pos
1450
- * @param indexs
1451
- * @param under
1452
- */
1453
- private [_removeView];
1454
- /**
1455
- * 恢复
1456
- * @param routes
1457
- *
1458
- * @returns
1459
- */
1460
- restore(routes?: Route[]): Promise<void>;
1461
- /**
1462
- * build page
1463
- * @param route
1464
- * @param routeModel
1465
- * @returns
1466
- */
1467
- private [_buildPage];
1468
- /**
1469
- * 解析组件
1470
- */
1471
- private [_resolveComponent];
1472
- /**
1473
- * 更新页面
1474
- * @param routeModel
1475
- * @param route
1476
- * @param session
1477
- * @param updateType
1478
- * @returns
1479
- */
1480
- private [_update];
1481
- /**
1482
- * 合并view
1483
- * @param page
1484
- * @param startViewLevel
1485
- * @param routeModel
1486
- * @param startModelLevel
1487
- * @param rootNodeRef
1488
- */
1489
- [_merge](page: Page, startViewLevel: number, routeModel: RouteModel, startModelLevel: number, rootNodeRef: ViewPlace): void;
1490
- /**
1491
- * router view与view同步数据
1492
- * @param name
1493
- * @param level
1494
- * @param rootView
1495
- * @param rootViewIndex
1496
- * @param parentView
1497
- * @param parentViewIndex
1498
- * @returns
1499
- */
1500
- [sync](name: string, level: number, rootView: View | null, rootViewIndex: number, parentView: View | null, parentViewIndex: number): View | null;
1501
- }
1502
-
1503
- declare const registerKey: unique symbol;
1504
- /**
1505
- * callback function
1506
- */
1507
- interface Callback {
1508
- (...args: any[]): void;
1509
- }
1510
- /**
1511
- * 事件代理
1512
- */
1513
- declare class EventProxy {
1514
- /**
1515
- * 注册表
1516
- */
1517
- private [registerKey];
1518
- /**
1519
- * 构造函数
1520
- */
1521
- constructor();
1522
- /**
1523
- * 绑定事件
1524
- * @param key
1525
- * @param callback
1526
- * @param once
1527
- * @returns
1528
- */
1529
- on(key: string, callback: Callback, once?: boolean): EventProxy;
1530
- /**
1531
- * 解除绑定
1532
- * @param key
1533
- * @param callback
1534
- * @returns
1535
- */
1536
- off(key: string, callback: Callback): EventProxy;
1537
- /**
1538
- * 绑定事件
1539
- * @param key
1540
- * @param callback
1541
- * @param once
1542
- * @returns
1543
- */
1544
- bind(key: string, callback: Callback, once?: boolean): EventProxy;
1545
- /**
1546
- * 解除绑定
1547
- * @param key
1548
- * @param callback
1549
- * @returns
1550
- */
1551
- unbind(key: string, callback: Callback): EventProxy;
1552
- /**
1553
- * 绑定一次性触发函数
1554
- * @param key
1555
- * @param callback
1556
- * @returns
1557
- */
1558
- once(key: string, callback: Callback): EventProxy;
1559
- /**
1560
- * 绑定多条件触发函数
1561
- * @param args
1562
- */
1563
- all(...args: any[]): this;
1564
- /**
1565
- * 触发函数
1566
- * @param key
1567
- * @param value
1568
- */
1569
- emit(key: string, ...value: any[]): this;
1570
- /**
1571
- * 触发函数
1572
- * @param key
1573
- * @param value
1574
- * @returns
1575
- */
1576
- trigger(key: string, ...value: any[]): EventProxy;
1577
- }
1578
-
1579
- /**
1580
- * 是否数组
1581
- */
1582
- declare const isArray: (arg: any) => arg is any[];
1583
- /**
1584
- * 是否为Map
1585
- * @param val
1586
- * @returns
1587
- */
1588
- declare const isMap: (val: unknown) => val is Map<any, any>;
1589
- /**
1590
- * 是否为Set
1591
- * @param val
1592
- * @returns
1593
- */
1594
- declare const isSet: (val: unknown) => val is Set<any>;
1595
- /**
1596
- * 是否为Date
1597
- * @param val
1598
- * @returns
1599
- */
1600
- declare const isDate: (val: unknown) => val is Date;
1601
- /**
1602
- * 是否为函数
1603
- * @param val
1604
- * @returns
1605
- */
1606
- declare const isFunction: (val: unknown) => val is Function;
1607
- /**
1608
- * 是否为字符串
1609
- * @param val
1610
- * @returns
1611
- */
1612
- declare const isString: (val: unknown) => val is string;
1613
- /**
1614
- * 是否为symbol
1615
- * @param val
1616
- * @returns
1617
- */
1618
- declare const isSymbol: (val: unknown) => val is symbol;
1619
- /**
1620
- * 是否为object
1621
- */
1622
- declare const isObject: (val: unknown) => val is Record<any, any>;
1623
- /**
1624
- * 是否为promise
1625
- * @param val
1626
- * @returns
1627
- */
1628
- declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
1629
- declare const toTypeString: (value: unknown) => string;
1630
- /**
1631
- * 是否为plain对象
1632
- * @param val
1633
- * @returns
1634
- */
1635
- declare const isPlainObject: (val: unknown) => val is object;
1636
- /**
1637
- * 是否为es module
1638
- * @param obj
1639
- * @returns
1640
- */
1641
- declare function isESModule(obj: any): obj is Object;
1642
- /**
1643
- * 继承(是否深度拷贝,dest,src1,src2,src3...)
1644
- *
1645
- * @returns
1646
- */
1647
- declare function extend(...args: any[]): any;
1648
- /**
1649
- * 克隆对象
1650
- * @param target
1651
- * @param source
1652
- * @param plain
1653
- *
1654
- * @returns
1655
- */
1656
- declare function clone(target: any, source: any, plain?: boolean): any;
1657
- /**
1658
- * 转换为boolean值
1659
- * @param val
1660
- * @returns
1661
- */
1662
- declare function toBoolean(val: unknown): boolean;
1663
- /**
1664
- * 转换为number值
1665
- * @param val
1666
- * @returns
1667
- */
1668
- declare function toNumber(val: unknown): number;
1669
- /**
1670
- * 判断两个对象是否一致
1671
- * @param x
1672
- * @param y
1673
- * @returns {boolean}
1674
- */
1675
- declare function isEqual(x: any, y: any): boolean;
1676
-
1677
- /**
1678
- * 发起请求
1679
- * @param args
1680
- * @returns
1681
- */
1682
- declare function request(args: any): Promise<any>;
1683
- /**
1684
- * 取消ajax请求
1685
- * @param id
1686
- */
1687
- declare function cancel(id: any): boolean;
1688
-
1689
- interface GenericFunction {
1690
- (...args: any[]): any;
1691
- }
1692
-
1693
- declare let onFoxActivated: (hook: GenericFunction) => void;
1694
- declare let onFoxDeactivated: (hook: GenericFunction) => void;
1695
-
1696
- /**
1697
- * Tool工具集合接口
1698
- */
1699
- interface Tools {
1700
- get each(): Function;
1701
- get type(): Function;
1702
- get isFunction(): Function;
1703
- get isArray(): Function;
1704
- get isArrayLike(): Function;
1705
- get makeArray(): Function;
1706
- get merge(): Function;
1707
- get isWindow(): Function;
1708
- get isPlainObject(): Function;
1709
- get isEqual(): Function;
1710
- }
1711
-
1712
- /**
1713
- * storage
1714
- */
1715
- interface Storage {
1716
- /**
1717
- * 获取item
1718
- * @param key
1719
- */
1720
- getItem(key: string): string | null;
1721
- /**
1722
- * 设置item
1723
- * @param key
1724
- * @param value
1725
- */
1726
- setItem(key: string, value: string): void;
1727
- /**
1728
- * remove item
1729
- * @param key
1730
- */
1731
- removeItem(key: string): void;
1732
- }
1733
- /**
1734
- * 创建web history
1735
- * @param navigateFirstRoute
1736
- * @param base
1737
- * @param query
1738
- * @param historyMonitor
1739
- * @param traceless
1740
- * @param storage
1741
- * @returns
1742
- */
1743
- declare function createWebHistory(navigateFirstRoute?: boolean, base?: string | null, query?: string, historyMonitor?: boolean, traceless?: boolean, storage?: Storage): RouterHistory;
1744
- /**
1745
- * 创建web hash history
1746
- * @param navigateFirstRoute
1747
- * @param query
1748
- * @param historyMonitor
1749
- * @param traceless
1750
- * @param storage
1751
- * @returns
1752
- */
1753
- declare function createWebHashHistory(navigateFirstRoute?: boolean, query?: string, historyMonitor?: boolean, traceless?: boolean, storage?: Storage): RouterHistory;
1754
-
1755
- /**
1756
- * 创建memory history
1757
- * @param base
1758
- * @param maxHistoryRecorderSize
1759
- * @returns
1760
- */
1761
- declare function createMemoryHistory(base?: string, maxHistoryRecorderSize?: number): RouterHistory;
1762
-
1763
- /**
1764
- * 全局Fox
1765
- */
1766
- declare const foxKey: InjectionKey<Fox>;
1767
- /**
1768
- * 全局Bus
1769
- */
1770
- declare const foxBusKey: InjectionKey<Tree>;
1771
- /**
1772
- * 全局Event Proxy
1773
- */
1774
- declare const foxEventProxyKey: InjectionKey<EventProxy>;
1775
- /**
1776
- * 参数
1777
- */
1778
- interface FoxOptions extends RouterOptions {
1779
- }
1780
- /**
1781
- * Fox接口
1782
- */
1783
- interface Fox extends Tools {
1784
- /**
1785
- * 返回router
1786
- */
1787
- get router(): Router;
1788
- /**
1789
- * 返回全局Bus
1790
- */
1791
- get bus(): Tree;
1792
- /**
1793
- * 返回Bus类型
1794
- */
1795
- get Bus(): typeof Bus;
1796
- /**
1797
- * 返回全局event proxy
1798
- */
1799
- get eventproxy(): EventProxy;
1800
- /**
1801
- * 返回全局event proxy
1802
- */
1803
- get EventProxy(): typeof EventProxy;
1804
- /**
1805
- * 返回event chain类型
1806
- */
1807
- get EventChain(): typeof EventChain;
1808
- /**
1809
- * 返回require
1810
- */
1811
- get require(): Require | null;
1812
- /**
1813
- * 返回fectch
1814
- */
1815
- get request(): Function;
1816
- /**
1817
- * 返回extend
1818
- */
1819
- get extend(): Function;
1820
- /**
1821
- * 返回clone
1822
- */
1823
- get clone(): Function;
1824
- /**
1825
- * 安装
1826
- * @param app
1827
- */
1828
- install(app: App): void;
1829
- }
1830
- /**
1831
- * 创建Fox
1832
- * @param options
1833
- * @returns
1834
- */
1835
- declare function createFox(options?: FoxOptions): Fox;
1836
- /**
1837
- * Returns the current router
1838
- * @returns
1839
- */
1840
- declare function useRouter(proxy?: ComponentPublicInstance): Router;
1841
- /**
1842
- * Returns the current route
1843
- * @param proxy
1844
- * @returns
1845
- */
1846
- declare function useRoute(proxy?: ComponentPublicInstance): Route | null;
1847
- /**
1848
- * Returns the current fox
1849
- * @param proxy
1850
- * @returns
1851
- */
1852
- declare function useFox(proxy?: ComponentPublicInstance): Fox;
1853
- /**
1854
- * Returns the global bus
1855
- * @param proxy
1856
- * @returns
1857
- */
1858
- declare function useBus(proxy?: ComponentPublicInstance): Tree;
1859
- /**
1860
- * Returns the global event proxy
1861
- * @param proxy
1862
- * @returns
1863
- */
1864
- declare function useEventProxy(proxy?: ComponentPublicInstance): EventProxy;
1865
- /**
1866
- * 路由更新前执行
1867
- * @param callback
1868
- */
1869
- declare function onBeforeRouteUpdate(callback: {
1870
- (to: Route, from?: Route): void;
1871
- }): void;
1872
- /**
1873
- * 路由更新后执行
1874
- * @param callback
1875
- */
1876
- declare function onAfterRouteUpdate(callback: {
1877
- (to: Route, from?: Route): void;
1878
- }): void;
1879
-
1880
- export { Bus, EventChain, EventProxy, Route, Router, cancel, clone, createFox, createMemoryHistory, createWebHashHistory, createWebHistory, extend, foxBusKey, foxEventProxyKey, foxKey, isArray, isDate, isESModule, isEqual, isFunction, isMap, isObject, isPlainObject, isPromise, isSet, isString, isSymbol, onAfterRouteUpdate, onBeforeRouteUpdate, onFoxActivated, onFoxDeactivated, request, toBoolean, toNumber, toTypeString, useBus, useEventProxy, useFox, useRoute, useRouter };
1
+ import { App } from 'vue';
2
+ import { ComponentInternalInstance } from 'vue';
3
+ import { ComponentPublicInstance } from 'vue';
4
+ import { InjectionKey } from 'vue';
5
+ import { Ref } from 'vue';
6
+ import { Require } from './require';
7
+
8
+ declare const _addRouteRecorder: unique symbol;
9
+
10
+ declare const _after: unique symbol;
11
+
12
+ declare const afterFiltersKey: unique symbol;
13
+
14
+ /**
15
+ * after route update filter
16
+ */
17
+ declare interface AfterRouteFilter {
18
+ (to: Route, from: Route, session: Record<string | number | symbol, any>): void;
19
+ }
20
+
21
+ declare const argsKey: unique symbol;
22
+
23
+ declare const _before: unique symbol;
24
+
25
+ declare const beforeFiltersKey: unique symbol;
26
+
27
+ /**
28
+ * before route restore filter(用于刷新还原)
29
+ */
30
+ declare interface BeforeResotreFilter {
31
+ (route: Route, index: number, mark: string, routes: Route[]): boolean;
32
+ }
33
+
34
+ /**
35
+ * before route update filter
36
+ */
37
+ declare interface BeforeRouteFilter {
38
+ (to: Route, from: Route, next: {
39
+ (pass?: boolean | Route): void;
40
+ }, session: Record<string | number | symbol, any>): void;
41
+ }
42
+
43
+ declare const _buildPage: unique symbol;
44
+
45
+ /**
46
+ * 导出Bus
47
+ */
48
+ export declare const Bus: any;
49
+
50
+ /**
51
+ * Bus Interface
52
+ */
53
+ export declare interface BusInterface extends Tree {
54
+ [propName: string | symbol | number]: any;
55
+ }
56
+
57
+ /**
58
+ * callback function
59
+ */
60
+ declare interface Callback {
61
+ (...args: any[]): void;
62
+ }
63
+
64
+ declare const chainKey: unique symbol;
65
+
66
+ declare const childrenKey: unique symbol;
67
+
68
+ /**
69
+ * 克隆对象
70
+ * @param target
71
+ * @param source
72
+ * @param plain
73
+ *
74
+ * @returns
75
+ */
76
+ export declare function clone(target: any, source: any, plain?: boolean): any;
77
+
78
+ declare const _cloneRouteRecorder: unique symbol;
79
+
80
+ declare const _constructRouteModel: unique symbol;
81
+
82
+ /**
83
+ * 创建Fox
84
+ * @param options
85
+ * @returns
86
+ */
87
+ export declare function createFox(options?: FoxOptions): Fox;
88
+
89
+ /**
90
+ * 创建memory history
91
+ * @param base
92
+ * @param maxHistoryRecorderSize
93
+ * @returns
94
+ */
95
+ export declare function createMemoryHistory(base?: string, maxHistoryRecorderSize?: number): RouterHistory;
96
+
97
+ declare const _createNextFn: unique symbol;
98
+
99
+ /**
100
+ * 创建web hash history
101
+ * @param navigateFirstRoute
102
+ * @param query
103
+ * @param historyMonitor
104
+ * @param traceless
105
+ * @param storage
106
+ * @returns
107
+ */
108
+ export declare function createWebHashHistory(navigateFirstRoute?: boolean, query?: string, historyMonitor?: boolean | IfFunction, traceless?: boolean | IfFunction, storage?: Storage_2): RouterHistory;
109
+
110
+ /**
111
+ * 创建web history
112
+ * @param navigateFirstRoute
113
+ * @param base
114
+ * @param query
115
+ * @param historyMonitor
116
+ * @param traceless
117
+ * @param storage
118
+ * @returns
119
+ */
120
+ export declare function createWebHistory(navigateFirstRoute?: boolean, base?: string | null, query?: string, historyMonitor?: boolean | IfFunction, traceless?: boolean | IfFunction, storage?: Storage_2): RouterHistory;
121
+
122
+ declare const currentKey: unique symbol;
123
+
124
+ declare const currentRoutes: unique symbol;
125
+
126
+ declare const cursorKey: unique symbol;
127
+
128
+ /**
129
+ * 删除 context value
130
+ * @param proxy
131
+ * @param key
132
+ *
133
+ */
134
+ export declare function deleteContextValue(proxy: ComponentPublicInstance, key: KeyType_2): void;
135
+
136
+ declare const _destroy: unique symbol;
137
+
138
+ declare const destroyFiltersKey: unique symbol;
139
+
140
+ /**
141
+ * destroy route update filter
142
+ */
143
+ declare interface DestroyRouteFilter {
144
+ (to: Route, session: Record<string | number | symbol, any>): void;
145
+ }
146
+
147
+ /**
148
+ * 完成Task类型(Exception,Finish, Wait)
149
+ */
150
+ declare interface EndTask {
151
+ (context: {
152
+ session: EventChainSession;
153
+ }, ...args: any[]): void;
154
+ }
155
+
156
+ declare const errorCallback: unique symbol;
157
+
158
+ declare const errorFnsKey: unique symbol;
159
+
160
+ /**
161
+ * 任务链路
162
+ */
163
+ export declare class EventChain {
164
+ /**
165
+ * 事件链路
166
+ */
167
+ private [chainKey];
168
+ /**
169
+ * 游标
170
+ */
171
+ private [cursorKey];
172
+ /**
173
+ * 是否持久模式(该状态为true的情况,已经执行的任务会继续保存在队列中)
174
+ */
175
+ private [persistentModeKey];
176
+ /**
177
+ * 状态
178
+ */
179
+ private [statusKey];
180
+ /**
181
+ * 参数
182
+ */
183
+ private [argsKey];
184
+ /**
185
+ * 异常参数
186
+ */
187
+ private [exArgsKey];
188
+ /**
189
+ * 移除函数
190
+ */
191
+ private [successFnsKey];
192
+ /**
193
+ * 错误函数
194
+ */
195
+ private [errorFnsKey];
196
+ /**
197
+ * 链路session
198
+ */
199
+ private [sessionKey]?;
200
+ /**
201
+ * 获取session
202
+ */
203
+ get session(): EventChainSession | undefined;
204
+ /**
205
+ * 构造函数
206
+ *
207
+ * @param session
208
+ * @param persistentMode
209
+ */
210
+ constructor(session?: EventChainSession, persistentMode?: boolean);
211
+ /**
212
+ * 触发链路的下一个任务
213
+ * @param step
214
+ * @param params
215
+ */
216
+ private [_go];
217
+ /**
218
+ * 跳转
219
+ * @param step
220
+ * @param params
221
+ */
222
+ go(step: number, ...params: any[]): EventChain;
223
+ /**
224
+ * 结束事件链调用,直接触发wait函数(success方法)
225
+ * @param params
226
+ */
227
+ finish(...params: any[]): EventChain;
228
+ /**
229
+ * 结束事件链调用,直接触发wait函数(error方法)
230
+ * @param params
231
+ */
232
+ reject(...params: any[]): EventChain;
233
+ /**
234
+ * 结束事件链调用,直接触发error函数
235
+ * @param params
236
+ */
237
+ throw(...params: any[]): EventChain;
238
+ /**
239
+ * 重置事件链,直接触发wait函数
240
+ * @param params
241
+ */
242
+ reset(...params: any[]): EventChain;
243
+ /**
244
+ * 加入任务
245
+ * @param task
246
+ * @returns {EventChain}
247
+ */
248
+ post(task: Task): EventChain;
249
+ /**
250
+ * 加入等待任务
251
+ * @param successFn
252
+ * @param errorFn
253
+ * @returns
254
+ */
255
+ wait(successFn: EndTask, errorFn: EndTask): EventChain;
256
+ /**
257
+ * 加入异常处理任务
258
+ * @param errorFn
259
+ * @returns
260
+ */
261
+ exception(errorFn: EndTask): EventChain;
262
+ /**
263
+ * 判断事件链是否已经执行完成
264
+ * @returns {boolean}
265
+ */
266
+ isFinish(): boolean;
267
+ }
268
+
269
+ /**
270
+ * event chain 上下文
271
+ */
272
+ export declare interface EventChainContext {
273
+ /**
274
+ * 任务跳转
275
+ */
276
+ go: {
277
+ (step: number, ...args: any[]): void;
278
+ };
279
+ /**
280
+ * 触发链路
281
+ */
282
+ resolve: {
283
+ (...args: any[]): void;
284
+ };
285
+ /**
286
+ * 中断链路
287
+ */
288
+ reject: {
289
+ (...args: any[]): void;
290
+ };
291
+ /**
292
+ * 插入任务
293
+ */
294
+ insert: {
295
+ (...args: any[]): void;
296
+ };
297
+ /**
298
+ * chain session
299
+ */
300
+ session: EventChainSession;
301
+ }
302
+
303
+ /**
304
+ * Session类型
305
+ */
306
+ export declare interface EventChainSession {
307
+ [propName: string]: any;
308
+ }
309
+
310
+ /**
311
+ * 事件代理
312
+ */
313
+ export declare class EventProxy {
314
+ /**
315
+ * 注册表
316
+ */
317
+ private [registerKey_2];
318
+ /**
319
+ * 构造函数
320
+ */
321
+ constructor();
322
+ /**
323
+ * 绑定事件
324
+ * @param key
325
+ * @param callback
326
+ * @param once
327
+ * @returns
328
+ */
329
+ on(key: string, callback: Callback, once?: boolean): EventProxy;
330
+ /**
331
+ * 解除绑定
332
+ * @param key
333
+ * @param callback
334
+ * @returns
335
+ */
336
+ off(key: string, callback: Callback): EventProxy;
337
+ /**
338
+ * 绑定事件
339
+ * @param key
340
+ * @param callback
341
+ * @param once
342
+ * @returns
343
+ */
344
+ bind(key: string, callback: Callback, once?: boolean): EventProxy;
345
+ /**
346
+ * 解除绑定
347
+ * @param key
348
+ * @param callback
349
+ * @returns
350
+ */
351
+ unbind(key: string, callback: Callback): EventProxy;
352
+ /**
353
+ * 绑定一次性触发函数
354
+ * @param key
355
+ * @param callback
356
+ * @returns
357
+ */
358
+ once(key: string, callback: Callback): EventProxy;
359
+ /**
360
+ * 绑定多条件触发函数
361
+ * @param args
362
+ */
363
+ all(...args: any[]): this;
364
+ /**
365
+ * 触发函数
366
+ * @param key
367
+ * @param value
368
+ */
369
+ emit(key: string, ...value: any[]): this;
370
+ /**
371
+ * 触发函数
372
+ * @param key
373
+ * @param value
374
+ * @returns
375
+ */
376
+ trigger(key: string, ...value: any[]): EventProxy;
377
+ }
378
+
379
+ declare const exArgsKey: unique symbol;
380
+
381
+ /**
382
+ * 继承(是否深度拷贝,dest,src1,src2,src3...)
383
+ *
384
+ * @returns
385
+ */
386
+ export declare function extend(...args: any[]): any;
387
+
388
+ declare const _findRootView: unique symbol;
389
+
390
+ declare const _findRouteModel: unique symbol;
391
+
392
+ declare const forestKey: unique symbol;
393
+
394
+ /**
395
+ * Fox接口
396
+ */
397
+ export declare interface Fox {
398
+ /**
399
+ * 返回router
400
+ */
401
+ get router(): Router;
402
+ /**
403
+ * 返回全局Bus
404
+ */
405
+ get bus(): BusInterface;
406
+ /**
407
+ * 返回Bus构造函数
408
+ */
409
+ get Bus(): typeof Bus;
410
+ /**
411
+ * 返回event proxy构造函数
412
+ */
413
+ get EventProxy(): typeof EventProxy;
414
+ /**
415
+ * 返回全局event proxy
416
+ */
417
+ get eventproxy(): EventProxy;
418
+ /**
419
+ * 返回event chain构造函数
420
+ */
421
+ get EventChain(): typeof EventChain;
422
+ /**
423
+ * 获取require构造函数
424
+ */
425
+ get Require(): typeof Require;
426
+ /**
427
+ * 获取require
428
+ */
429
+ get require(): Require;
430
+ /**
431
+ * 返回extend
432
+ */
433
+ get extend(): Function;
434
+ /**
435
+ * 返回clone
436
+ */
437
+ get clone(): Function;
438
+ /**
439
+ * 判断是否为es模块
440
+ */
441
+ get isESModule(): Function;
442
+ /**
443
+ * 安装
444
+ * @param app
445
+ */
446
+ install(app: App): void;
447
+ }
448
+
449
+ /**
450
+ * 全局Bus
451
+ */
452
+ export declare const foxBusKey: FoxInjectionKey<Tree>;
453
+
454
+ /**
455
+ * 全局Event Proxy
456
+ */
457
+ export declare const foxEventProxyKey: FoxInjectionKey<EventProxy>;
458
+
459
+ declare interface FoxInjectionKey<T> extends InjectionKey<T> {
460
+ }
461
+
462
+ /**
463
+ * 全局Fox
464
+ */
465
+ export declare const foxKey: FoxInjectionKey<Fox>;
466
+
467
+ /**
468
+ * 参数
469
+ */
470
+ export declare interface FoxOptions extends RouterOptions {
471
+ }
472
+
473
+ /**
474
+ * 通用函数接口
475
+ */
476
+ export declare interface GenericFunction {
477
+ (...args: any[]): any;
478
+ }
479
+
480
+ declare const _getFirstView: unique symbol;
481
+
482
+ declare const _go: unique symbol;
483
+
484
+ declare const growKey: unique symbol;
485
+
486
+ declare const _handleError: unique symbol;
487
+
488
+ declare const _handleHistoryChange: unique symbol;
489
+
490
+ declare const _handleRouteUpdated: unique symbol;
491
+
492
+ /**
493
+ * history change handler
494
+ */
495
+ declare interface HistoryChangeHandler {
496
+ (args: Array<Route> | string): void;
497
+ }
498
+
499
+ declare const historyKey: unique symbol;
500
+
501
+ declare const idKey: unique symbol;
502
+
503
+ /**
504
+ * If Function
505
+ */
506
+ declare interface IfFunction {
507
+ (...args: any[]): boolean;
508
+ }
509
+
510
+ declare const initKey: unique symbol;
511
+
512
+ /**
513
+ * inject context value
514
+ * @param proxy
515
+ * @returns
516
+ */
517
+ export declare function injectContextValue(proxy: ComponentPublicInstance, key: KeyType_2): unknown;
518
+
519
+ /**
520
+ * 是否数组
521
+ */
522
+ export declare const isArray: (arg: any) => arg is any[];
523
+
524
+ /**
525
+ * 是否为Date
526
+ * @param val
527
+ * @returns
528
+ */
529
+ export declare const isDate: (val: unknown) => val is Date;
530
+
531
+ /**
532
+ * 判断两个对象是否一致
533
+ * @param x
534
+ * @param y
535
+ * @return
536
+ */
537
+ export declare function isEqual(x: any, y: any): boolean;
538
+
539
+ /**
540
+ * 是否为es module
541
+ * @param obj
542
+ * @returns
543
+ */
544
+ export declare function isESModule(obj: any): obj is Object;
545
+
546
+ /**
547
+ * 是否为函数
548
+ * @param val
549
+ * @returns
550
+ */
551
+ export declare const isFunction: (val: unknown) => val is Function;
552
+
553
+ /**
554
+ * 是否为Map
555
+ * @param val
556
+ * @returns
557
+ */
558
+ export declare const isMap: (val: unknown) => val is Map<any, any>;
559
+
560
+ /**
561
+ * 是否为空对象
562
+ * @param val
563
+ * @returns
564
+ */
565
+ export declare const isNil: (val: unknown) => val is null;
566
+
567
+ /**
568
+ * 是否为object
569
+ */
570
+ export declare const isObject: (val: unknown) => val is Record<any, any>;
571
+
572
+ /**
573
+ * 是否为plain对象
574
+ * @param val
575
+ * @returns
576
+ */
577
+ export declare const isPlainObject: (val: unknown) => val is object;
578
+
579
+ /**
580
+ * 是否为promise
581
+ * @param val
582
+ * @returns
583
+ */
584
+ export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
585
+
586
+ /**
587
+ * 是否为Set
588
+ * @param val
589
+ * @returns
590
+ */
591
+ export declare const isSet: (val: unknown) => val is Set<any>;
592
+
593
+ /**
594
+ * 是否为字符串
595
+ * @param val
596
+ * @returns
597
+ */
598
+ export declare const isString: (val: unknown) => val is string;
599
+
600
+ /**
601
+ * 是否为symbol
602
+ * @param val
603
+ * @returns
604
+ */
605
+ export declare const isSymbol: (val: unknown) => val is symbol;
606
+
607
+ declare type KeyType_2 = string | number | Symbol;
608
+
609
+ /**
610
+ *
611
+ */
612
+ declare class Layer {
613
+ /**
614
+ * 节点(view集合)
615
+ */
616
+ views: View[];
617
+ }
618
+
619
+ declare const _load: unique symbol;
620
+
621
+ declare const mainDispatcherKey: unique symbol;
622
+
623
+ declare const _markReady: unique symbol;
624
+
625
+ declare class MarkRecord {
626
+ currentRoute: Route;
627
+ routes: Array<Route>;
628
+ /**
629
+ * 构造函数
630
+ * @param currentRoute
631
+ * @param routes
632
+ */
633
+ constructor(currentRoute: Route, routes: Array<Route>);
634
+ }
635
+
636
+ declare const _merge: unique symbol;
637
+
638
+ /**
639
+ * model (RouteModel > ModelLayer > Model)
640
+ */
641
+ declare class Model {
642
+ /**
643
+ * 唯一ID(用于区分model)
644
+ */
645
+ id: number;
646
+ /**
647
+ * 名称
648
+ */
649
+ name: string;
650
+ /**
651
+ * 属性
652
+ */
653
+ props: Record<string | number | symbol, any> | boolean | {
654
+ (route: Route): any;
655
+ } | undefined;
656
+ /**
657
+ * 元数据
658
+ */
659
+ meta?: Record<string | number | symbol, any>;
660
+ /**
661
+ * 原始组件数据
662
+ */
663
+ src: any;
664
+ /**
665
+ * 组件(解析后组件)
666
+ */
667
+ component: any;
668
+ /**
669
+ * 构造函数
670
+ *
671
+ * @param name
672
+ * @param src
673
+ * @param props
674
+ * @param meta
675
+ */
676
+ constructor(name: string, src: any, props?: Record<string | number | symbol, any> | {
677
+ (route: Route): any;
678
+ } | boolean, meta?: Record<string | number | symbol, any>);
679
+ /**
680
+ * 是否已经解析完成
681
+ */
682
+ get isResolved(): boolean;
683
+ /**
684
+ * 解析组件
685
+ */
686
+ resolve(): Promise<void>;
687
+ }
688
+
689
+ /**
690
+ * 层(RouteModel > ModelLayer > Model)
691
+ */
692
+ declare class ModelLayer {
693
+ /**
694
+ * 节点
695
+ */
696
+ models: Model[];
697
+ }
698
+
699
+ /**
700
+ * model插槽
701
+ */
702
+ declare class ModelSlot {
703
+ /**
704
+ * 实例
705
+ */
706
+ instance: ComponentInternalInstance | null;
707
+ /**
708
+ * model
709
+ */
710
+ model: Model;
711
+ /**
712
+ * route
713
+ */
714
+ route: Route | null;
715
+ /**
716
+ * 是否激活状态
717
+ */
718
+ active: boolean;
719
+ /**
720
+ * 索引
721
+ */
722
+ index: number;
723
+ /**
724
+ * 构造函数
725
+ * @param route
726
+ * @param model
727
+ * @param index
728
+ * @param active
729
+ */
730
+ constructor(route: Route | null, model: Model, index?: number, active?: boolean);
731
+ }
732
+
733
+ declare const nameKey: unique symbol;
734
+
735
+ declare const notFoundKey: unique symbol;
736
+
737
+ declare const notFoundPathKey: unique symbol;
738
+
739
+ /**
740
+ * 路由更新后执行
741
+ * @param callback
742
+ */
743
+ export declare function onAfterRouteUpdate(callback: {
744
+ (to: Route, from?: Route): void;
745
+ }): void;
746
+
747
+ /**
748
+ * 路由更新前执行
749
+ * @param callback
750
+ */
751
+ export declare function onBeforeRouteUpdate(callback: {
752
+ (to: Route, from?: Route): void;
753
+ }): void;
754
+
755
+ export declare const onFoxActivated: (hook: GenericFunction) => void;
756
+
757
+ export declare const onFoxInactivated: (hook: GenericFunction) => void;
758
+
759
+ /**
760
+ * 操作类型
761
+ * @type {Enum}
762
+ */
763
+ declare enum OperationType {
764
+ /**
765
+ * Push策略(生产历史记录)
766
+ */
767
+ Push = 0,
768
+ /**
769
+ * 替换策略(替换当前历史记录)
770
+ */
771
+ Replace = 1,
772
+ /**
773
+ * 修改策略(不影响历史记录)
774
+ */
775
+ Put = 2,
776
+ /**
777
+ * 增加策略(生成历史记录)
778
+ */
779
+ Append = 3,
780
+ /**
781
+ * 打开策略,如果不存在则打开,否则切换(生成历史记录)
782
+ */
783
+ Open = 4
784
+ }
785
+
786
+ /**
787
+ * page
788
+ */
789
+ declare class Page {
790
+ /**
791
+ * 层
792
+ */
793
+ layers: Layer[];
794
+ }
795
+
796
+ declare const parentNodeKey: unique symbol;
797
+
798
+ declare const persistentModeKey: unique symbol;
799
+
800
+ /**
801
+ * 属性过滤器
802
+ */
803
+ declare interface PropsFilter {
804
+ (props: Record<string | symbol, any>): Record<string | symbol, any>;
805
+ }
806
+
807
+ declare const propsFilterKey: unique symbol;
808
+
809
+ /**
810
+ * provide context value
811
+ * @param proxy
812
+ * @param key
813
+ * @param value
814
+ */
815
+ export declare function provideContextValue(proxy: ComponentPublicInstance, key: KeyType_2, value: any): void;
816
+
817
+ declare const readyHandlersKey: unique symbol;
818
+
819
+ declare const readyKey: unique symbol;
820
+
821
+ declare const registerKey: unique symbol;
822
+
823
+ declare const registerKey_2: unique symbol;
824
+
825
+ declare const _removeRouteRecorder: unique symbol;
826
+
827
+ declare const _removeView: unique symbol;
828
+
829
+ declare const _resolveComponent: unique symbol;
830
+
831
+ declare const resolveRoute: unique symbol;
832
+
833
+ declare const rootKey: unique symbol;
834
+
835
+ declare const rootNodeKey: unique symbol;
836
+
837
+ /**
838
+ * 路由(跳转目标)
839
+ */
840
+ export declare class Route {
841
+ /**
842
+ * 路径
843
+ */
844
+ path?: string;
845
+ /**
846
+ * 返回full path
847
+ */
848
+ get fullPath(): string;
849
+ /**
850
+ * 别名路径(设置了该属性后,url的route mark优先使用别名显示)
851
+ */
852
+ alias?: string;
853
+ /**
854
+ * 名称
855
+ */
856
+ name?: string;
857
+ /**
858
+ * 嵌入root节点
859
+ */
860
+ root?: string;
861
+ /**
862
+ * 参数
863
+ */
864
+ params?: Record<string | number | symbol, any>;
865
+ /**
866
+ * 查询
867
+ */
868
+ query?: any;
869
+ /**
870
+ * 无痕迹模式
871
+ */
872
+ traceless?: boolean;
873
+ /**
874
+ * 模版path(设置了该属性后,设置了template属性后,会使用template指向的ruteModel作为模版创建新的ruote页面)
875
+ */
876
+ template?: string;
877
+ /**
878
+ * 获取匹配的元数组列表
879
+ */
880
+ matched?: {
881
+ meta: Record<string | number | symbol, any>;
882
+ }[];
883
+ /**
884
+ * route本身的元数据
885
+ */
886
+ meta?: Record<string | number | symbol, any>;
887
+ /**
888
+ * 成功回调函数
889
+ */
890
+ success?: {
891
+ (...arg: any[]): void;
892
+ };
893
+ /**
894
+ * 失败回调函数
895
+ */
896
+ error?: {
897
+ (...arg: any[]): void;
898
+ };
899
+ /**
900
+ * 页面销毁回答函数
901
+ */
902
+ destroy?: {
903
+ (...arg: any[]): void;
904
+ };
905
+ /**
906
+ * 操作类型(Push, Replace, Put, Append)
907
+ */
908
+ opsType?: OperationType;
909
+ /**
910
+ * 更新类型(All,Part)
911
+ */
912
+ updateType?: UpdateType;
913
+ /**
914
+ * view属性集合(用于multi view的tab view属性)
915
+ */
916
+ viewTagAttrs?: any;
917
+ /**
918
+ * 索引(用于opsType为Append的情况下,可以精确卸载的需求)
919
+ */
920
+ index?: number;
921
+ /**
922
+ * 是否激活状态(用于多视图,Open操作的情况下,标志view是否为激活状态)
923
+ */
924
+ active?: boolean;
925
+ /**
926
+ * 插槽(用于历史还原)
927
+ */
928
+ slot?: Slot;
929
+ /**
930
+ * session(router执行链路session)
931
+ */
932
+ session?: Session;
933
+ /**
934
+ * 克隆
935
+ * @param target
936
+ * @param plain 是否只克隆plain对象
937
+ */
938
+ static clone(target: Route, plain: boolean): Route;
939
+ /**
940
+ * 判断路由是否相同
941
+ * @param x
942
+ * @param y
943
+ * @returns
944
+ */
945
+ static isSame(x: Route, y: Route): boolean;
946
+ /**
947
+ * 判断路由对应的route model是否一致
948
+ * @param x
949
+ * @param y
950
+ * @returns
951
+ */
952
+ static isSameForRouteModel(x: Route, y: Route): boolean;
953
+ /**
954
+ * 由对象生成路由
955
+ * @param obj
956
+ * @returns
957
+ */
958
+ static from(obj: any): Route;
959
+ }
960
+
961
+ /**
962
+ * 路由配置
963
+ */
964
+ export declare interface RouteConfig {
965
+ /**
966
+ * 路径
967
+ */
968
+ path?: string;
969
+ /**
970
+ * 名称
971
+ */
972
+ name?: string;
973
+ /**
974
+ * 转发路径
975
+ */
976
+ redirect?: string;
977
+ /**
978
+ * 组件
979
+ */
980
+ component?: any;
981
+ /**
982
+ * 组件映射
983
+ */
984
+ components?: {
985
+ [propName: string]: any;
986
+ };
987
+ /**
988
+ * 孩子节点
989
+ */
990
+ children?: any[];
991
+ /**
992
+ * 属性
993
+ */
994
+ props?: Record<string | number | symbol, any> | boolean | {
995
+ (route: Route): any;
996
+ };
997
+ /**
998
+ * 元数据
999
+ */
1000
+ meta?: Record<string | number | symbol, any>;
1001
+ }
1002
+
1003
+ /**
1004
+ * Route Model(RouteModel > ModelLayer > Model)
1005
+ */
1006
+ declare class RouteModel {
1007
+ /**
1008
+ * 路径
1009
+ */
1010
+ path?: string;
1011
+ /**
1012
+ * 路径match
1013
+ */
1014
+ match: any;
1015
+ /**
1016
+ * 转发路径
1017
+ */
1018
+ redirect?: string;
1019
+ /**
1020
+ * 名称
1021
+ */
1022
+ name?: string;
1023
+ /**
1024
+ * layer集合
1025
+ */
1026
+ layers: ModelLayer[];
1027
+ }
1028
+
1029
+ export declare class Router {
1030
+ /**
1031
+ * 注册表
1032
+ */
1033
+ private [registerKey];
1034
+ /**
1035
+ * not found route
1036
+ */
1037
+ private [notFoundKey]?;
1038
+ /**
1039
+ * not found route path
1040
+ */
1041
+ private [notFoundPathKey];
1042
+ /**
1043
+ * ready
1044
+ */
1045
+ private [readyKey];
1046
+ /**
1047
+ * ready handlers
1048
+ */
1049
+ private [readyHandlersKey];
1050
+ /**
1051
+ * 页面根节点
1052
+ */
1053
+ private [forestKey];
1054
+ /**
1055
+ * 历史记录控制器
1056
+ */
1057
+ private [historyKey]?;
1058
+ /**
1059
+ * 当前路由集合
1060
+ */
1061
+ private [currentRoutes];
1062
+ /**
1063
+ * 错误回调
1064
+ */
1065
+ private [errorCallback];
1066
+ /**
1067
+ * 全局route更新监听器
1068
+ */
1069
+ private [routeUpdatedCallback];
1070
+ /**
1071
+ * before过滤器队列
1072
+ */
1073
+ private [beforeFiltersKey];
1074
+ /**
1075
+ * after过滤器队列
1076
+ */
1077
+ private [afterFiltersKey];
1078
+ /**
1079
+ * destroy过滤器队列
1080
+ */
1081
+ private [destroyFiltersKey];
1082
+ /**
1083
+ * 属性传递过滤器
1084
+ */
1085
+ private [propsFilterKey];
1086
+ /**
1087
+ * 主任务分发器
1088
+ */
1089
+ private [mainDispatcherKey];
1090
+ /**
1091
+ * 路由守护者
1092
+ */
1093
+ private [routerGuardKey];
1094
+ /**
1095
+ * 是否初始化
1096
+ */
1097
+ private [initKey];
1098
+ /**
1099
+ * 当前最新路由
1100
+ */
1101
+ private [currentKey];
1102
+ /**
1103
+ * 获取当前最新route
1104
+ */
1105
+ get current(): Route | null;
1106
+ private options;
1107
+ /**
1108
+ * 构造函数
1109
+ * @param options
1110
+ */
1111
+ constructor(options: RouterOptions);
1112
+ /**
1113
+ * 记录错误日志
1114
+ * @param error
1115
+ * @param route
1116
+ */
1117
+ private [_handleError];
1118
+ /**
1119
+ * 初始化
1120
+ */
1121
+ init(): void;
1122
+ /**
1123
+ * 第一次导航是否完成
1124
+ */
1125
+ isReady(): Promise<void>;
1126
+ /**
1127
+ * 设置第一导航完成
1128
+ */
1129
+ private [_markReady];
1130
+ /**
1131
+ * 处理历史记录
1132
+ * @param record
1133
+ */
1134
+ private [_handleHistoryChange];
1135
+ /**
1136
+ * 处理route updated事件
1137
+ * @param route
1138
+ */
1139
+ private [_handleRouteUpdated];
1140
+ /**
1141
+ * 加入路由记录
1142
+ * @param route
1143
+ */
1144
+ private [_addRouteRecorder];
1145
+ /**
1146
+ * 克隆路由记录
1147
+ * @returns
1148
+ */
1149
+ private [_cloneRouteRecorder];
1150
+ /**
1151
+ * 移除路由记录
1152
+ *
1153
+ * @param route
1154
+ */
1155
+ private [_removeRouteRecorder];
1156
+ /**
1157
+ * 设置history monitor是否启动
1158
+ */
1159
+ set historyMonitor(val: boolean | IfFunction);
1160
+ /**
1161
+ * 获取history monitor
1162
+ */
1163
+ get historyMonitor(): boolean | IfFunction;
1164
+ /**
1165
+ * 设置无痕模式,不改变历史记录
1166
+ */
1167
+ set traceless(val: boolean | IfFunction);
1168
+ /**
1169
+ * 获取无痕模式(不改变历史记录)
1170
+ */
1171
+ get traceless(): boolean | IfFunction;
1172
+ /**
1173
+ * 设置属性传递过滤器
1174
+ */
1175
+ set propsFilter(filter: PropsFilter | null);
1176
+ /**
1177
+ * 获取属性传递过滤器
1178
+ */
1179
+ get propsFilter(): PropsFilter | null;
1180
+ /**
1181
+ * 设置还原点
1182
+ *
1183
+ */
1184
+ setRestorePoint(): void;
1185
+ /**
1186
+ * 注册route updated处理函数
1187
+ * @param callback
1188
+ */
1189
+ onRouteUpdated(callback: {
1190
+ (route?: Route | null): void;
1191
+ } | null): void;
1192
+ /**
1193
+ * 注册全局异常处理函数
1194
+ * @param callback
1195
+ */
1196
+ onError(callback: {
1197
+ (...args: any[]): void;
1198
+ } | null): void;
1199
+ /**
1200
+ * 添加before filter
1201
+ * @param filter
1202
+ */
1203
+ beforeEach(filter: BeforeRouteFilter): void;
1204
+ /**
1205
+ * 移除before filter
1206
+ * @param filter
1207
+ */
1208
+ removeBeforeEach(filter: BeforeRouteFilter): boolean;
1209
+ /**
1210
+ * 添加after filter
1211
+ * @param filter
1212
+ */
1213
+ afterEach(filter: AfterRouteFilter): void;
1214
+ /**
1215
+ * 移除after filter
1216
+ * @param filter
1217
+ * @returns
1218
+ */
1219
+ removeAfterEach(filter: AfterRouteFilter): boolean;
1220
+ /**
1221
+ * 添加destroy filter
1222
+ * @param filter
1223
+ */
1224
+ destroyEach(filter: DestroyRouteFilter): void;
1225
+ /**
1226
+ * 移除after filter
1227
+ * @param filter
1228
+ * @returns
1229
+ */
1230
+ removeDestroyEach(filter: DestroyRouteFilter): boolean;
1231
+ /**
1232
+ * 添加before restore filter
1233
+ * @param filter
1234
+ */
1235
+ beforeRestoreEach(filter: BeforeResotreFilter): void;
1236
+ /**
1237
+ * 移除before restore filter
1238
+ * @param filter
1239
+ * @returns
1240
+ */
1241
+ removeBeforeRestoreEach(filter: BeforeResotreFilter): boolean;
1242
+ /**
1243
+ * 加入路由配置列表
1244
+ * @param routeConfigs
1245
+ */
1246
+ addRoutes(routeConfigs: RouteConfig[]): void;
1247
+ /**
1248
+ * 加入路由配置
1249
+ * @param routeConfig
1250
+ * @param index
1251
+ */
1252
+ addRoute(routeConfig: RouteConfig, index?: number): void;
1253
+ /**
1254
+ * 移除路由
1255
+ *
1256
+ * @param route
1257
+ */
1258
+ removeRoute(route: Route | string): boolean;
1259
+ /**
1260
+ * 判断路由是否存在
1261
+ *
1262
+ * @param route
1263
+ */
1264
+ hasRoute(route: Route | string): boolean;
1265
+ /**
1266
+ * 配置not found路由路径
1267
+ * @param path
1268
+ */
1269
+ setNotFoundPath(path: string): void;
1270
+ /**
1271
+ * 配置not found路由配置
1272
+ * @param routeConfig
1273
+ */
1274
+ setNotFoundRoute(routeConfig: RouteConfig): void;
1275
+ /**
1276
+ * 返回目前加载的routes
1277
+ */
1278
+ getRoutes(): RouteModel[];
1279
+ /**
1280
+ * 根据路由构建route model
1281
+ *
1282
+ * @param routeConfig
1283
+ */
1284
+ private [_constructRouteModel];
1285
+ /**
1286
+ * 查找route model
1287
+ * @param cite
1288
+ */
1289
+ private [_findRouteModel];
1290
+ /**
1291
+ * 解释路由
1292
+ * @param args
1293
+ * @returns
1294
+ */
1295
+ [resolveRoute](args: any): Route | null;
1296
+ /**
1297
+ * 路由跳转(operation类型为Push)
1298
+ * @param args
1299
+ */
1300
+ push(...args: any[]): Router;
1301
+ /**
1302
+ * 路由跳转(operation类型为Put)
1303
+ * @param args
1304
+ */
1305
+ put(...args: any[]): Router;
1306
+ /**
1307
+ * 路由跳转(operation类型为Replace)
1308
+ * @param args
1309
+ */
1310
+ replace(...args: any[]): Router;
1311
+ /**
1312
+ * 路由跳转(operation类型为Append)
1313
+ * @param args
1314
+ */
1315
+ append(...args: any[]): Router;
1316
+ /**
1317
+ * 移除
1318
+ * @param term
1319
+ * @param changeHistory
1320
+ */
1321
+ remove(term?: any, changeHistory?: boolean): Promise<boolean>;
1322
+ /**
1323
+ * 路由跳转(operation类型为Open)
1324
+ * @param args
1325
+ */
1326
+ open(...args: any[]): Router;
1327
+ /**
1328
+ * 关闭路由跳转的页面
1329
+ * @param args
1330
+ */
1331
+ close(args: any): Router;
1332
+ /**
1333
+ * 路由跳转
1334
+ * @param args
1335
+ */
1336
+ to(...args: any[]): Router;
1337
+ /**
1338
+ * 历史回退
1339
+ * @param delta
1340
+ */
1341
+ back(delta?: number): void;
1342
+ /**
1343
+ * 创建next函数
1344
+ */
1345
+ private [_createNextFn];
1346
+ /**
1347
+ * 开始链路
1348
+ * @param route
1349
+ * @returns {EventChain}
1350
+ */
1351
+ private [_start];
1352
+ /**
1353
+ * 执行before事件
1354
+ * @param chain
1355
+ */
1356
+ private [_before];
1357
+ /**
1358
+ * 执行after事件
1359
+ * @param chain
1360
+ */
1361
+ private [_after];
1362
+ /**
1363
+ * 执行销毁事件
1364
+ * @param route
1365
+ * @param session
1366
+ */
1367
+ private [_destroy];
1368
+ /**
1369
+ * 加载路由
1370
+ * @param chain
1371
+ */
1372
+ private [_load];
1373
+ /**
1374
+ * 卸载(只能用于卸载多视图上的view)
1375
+ *
1376
+ * @param routes
1377
+ */
1378
+ private [_unload];
1379
+ /**
1380
+ * 查找root view索引
1381
+ * @param page
1382
+ * @param route
1383
+ */
1384
+ private [_findRootView];
1385
+ /**
1386
+ * 查找first view
1387
+ * @param page
1388
+ */
1389
+ private [_getFirstView];
1390
+ /**
1391
+ * 移除view
1392
+ * @param page
1393
+ * @param pos
1394
+ * @param indexList
1395
+ * @param retainRoot
1396
+ */
1397
+ private [_removeView];
1398
+ /**
1399
+ * 恢复
1400
+ * @param routes
1401
+ *
1402
+ * @returns
1403
+ */
1404
+ restore(routes?: Route[]): Promise<void>;
1405
+ /**
1406
+ * build page
1407
+ * @param route
1408
+ * @param routeModel
1409
+ * @returns
1410
+ */
1411
+ private [_buildPage];
1412
+ /**
1413
+ * 解析组件
1414
+ */
1415
+ private [_resolveComponent];
1416
+ /**
1417
+ * 更新页面
1418
+ * @param routeModel
1419
+ * @param route
1420
+ * @param session
1421
+ * @param updateType
1422
+ * @returns
1423
+ */
1424
+ private [_update];
1425
+ /**
1426
+ * 合并view
1427
+ * @param page
1428
+ * @param startViewLevel
1429
+ * @param routeModel
1430
+ * @param startModelLevel
1431
+ * @param rootNodeRef
1432
+ */
1433
+ [_merge](page: Page, startViewLevel: number, routeModel: RouteModel, startModelLevel: number, rootNodeRef: ViewPlace): void;
1434
+ /**
1435
+ * router view与view同步数据
1436
+ * @param name
1437
+ * @param level
1438
+ * @param rootView
1439
+ * @param rootViewIndex
1440
+ * @param parentView
1441
+ * @param parentViewIndex
1442
+ * @returns
1443
+ */
1444
+ [sync](name: string, level: number, rootView: View | null, rootViewIndex: number, parentView: View | null, parentViewIndex: number): View | null;
1445
+ }
1446
+
1447
+ declare const routerGuardKey: unique symbol;
1448
+
1449
+ /**
1450
+ * Router History
1451
+ */
1452
+ declare interface RouterHistory {
1453
+ /**
1454
+ * 基础路径
1455
+ */
1456
+ base: string;
1457
+ /**
1458
+ * 是否监听history change
1459
+ */
1460
+ historyMonitor: boolean | IfFunction;
1461
+ /**
1462
+ * 是否支持无痕模式
1463
+ */
1464
+ traceless: boolean | IfFunction;
1465
+ /**
1466
+ * 初始化
1467
+ * @param firstNavigate
1468
+ * @returns
1469
+ */
1470
+ init(firstNavigate: boolean): Promise<void>;
1471
+ /**
1472
+ * 销毁
1473
+ */
1474
+ destroy(): void;
1475
+ /**
1476
+ * 添加before restore filter
1477
+ * @param filter
1478
+ */
1479
+ beforeRestoreEach(filter: BeforeResotreFilter): void;
1480
+ /**
1481
+ * 移除before restore filter
1482
+ * @param filter
1483
+ * @returns
1484
+ */
1485
+ removeBeforeRestoreEach(filter: BeforeResotreFilter): boolean;
1486
+ /**
1487
+ * 监听历史记录改变
1488
+ * @param handler
1489
+ */
1490
+ listen(handler: HistoryChangeHandler): void;
1491
+ /**
1492
+ * 跳转
1493
+ * @param delta
1494
+ * @param consume 是否消费事件
1495
+ */
1496
+ go(delta: number, consume?: boolean | {
1497
+ (): boolean;
1498
+ }): void;
1499
+ /**
1500
+ * 回退到指定路由
1501
+ * @param target
1502
+ * @param trigger
1503
+ */
1504
+ goBack(target: Route | null, trigger: Function): void;
1505
+ /**
1506
+ * 加入记录
1507
+ * @param record
1508
+ */
1509
+ push(record: MarkRecord): void;
1510
+ /**
1511
+ * 替换当前记录
1512
+ * @param record
1513
+ */
1514
+ replace(record: MarkRecord): void;
1515
+ /**
1516
+ * 设置还原点
1517
+ *
1518
+ * @param routes 路由记录
1519
+ */
1520
+ setRestorePoint(routes?: Array<Route>): void;
1521
+ }
1522
+
1523
+ /**
1524
+ * router options
1525
+ */
1526
+ export declare interface RouterOptions {
1527
+ /**
1528
+ * 默认操作类型
1529
+ */
1530
+ defaultOperationType?: OperationType;
1531
+ /**
1532
+ * 模块路径解释
1533
+ */
1534
+ modulePathResolve?: {
1535
+ (route: Route): string;
1536
+ };
1537
+ /**
1538
+ * router history
1539
+ */
1540
+ history?: RouterHistory;
1541
+ /**
1542
+ * 路由配置列表
1543
+ */
1544
+ routes?: RouteConfig[];
1545
+ /**
1546
+ * not found 路由
1547
+ */
1548
+ notFound?: RouteConfig;
1549
+ /**
1550
+ * not found 路由路径
1551
+ */
1552
+ notFoundPath?: string;
1553
+ }
1554
+
1555
+ declare const routeUpdatedCallback: unique symbol;
1556
+
1557
+ declare class Session {
1558
+ /**
1559
+ * 目标路由
1560
+ */
1561
+ to?: Route;
1562
+ /**
1563
+ * 目标路由
1564
+ */
1565
+ routeModel?: RouteModel;
1566
+ /**
1567
+ * 来源路由
1568
+ */
1569
+ from?: Route;
1570
+ /**
1571
+ * 流程数据
1572
+ */
1573
+ data: {
1574
+ [propName: string]: any;
1575
+ };
1576
+ /**
1577
+ * 构造函数
1578
+ * @param to
1579
+ * @param from
1580
+ */
1581
+ constructor(to?: Route, from?: Route);
1582
+ /**
1583
+ * 转换为session
1584
+ * @param src
1585
+ * @returns
1586
+ */
1587
+ static from(src: {
1588
+ [propName: string]: any;
1589
+ }): Session;
1590
+ }
1591
+
1592
+ export declare const sessionKey: unique symbol;
1593
+
1594
+ /**
1595
+ * 插槽
1596
+ */
1597
+ declare class Slot {
1598
+ /**
1599
+ * 插槽名称
1600
+ */
1601
+ name: string;
1602
+ /**
1603
+ * 层次
1604
+ */
1605
+ level: number;
1606
+ /**
1607
+ * root插槽节点名称
1608
+ */
1609
+ rootName: string | undefined;
1610
+ /**
1611
+ * root插槽节点index
1612
+ */
1613
+ rootIndex: number;
1614
+ /**
1615
+ * 构造函数
1616
+ * @param name
1617
+ * @param level
1618
+ * @param rootName
1619
+ */
1620
+ constructor(name: string, level: number, rootName: string | undefined, rootIndex: number);
1621
+ }
1622
+
1623
+ declare const _start: unique symbol;
1624
+
1625
+ declare const statusKey: unique symbol;
1626
+
1627
+ /**
1628
+ * storage
1629
+ */
1630
+ declare interface Storage_2 {
1631
+ /**
1632
+ * 获取item
1633
+ * @param key
1634
+ */
1635
+ getItem(key: string): string | null;
1636
+ /**
1637
+ * 设置item
1638
+ * @param key
1639
+ * @param value
1640
+ */
1641
+ setItem(key: string, value: string): void;
1642
+ /**
1643
+ * remove item
1644
+ * @param key
1645
+ */
1646
+ removeItem(key: string): void;
1647
+ }
1648
+ export { Storage_2 as Storage }
1649
+
1650
+ declare const successFnsKey: unique symbol;
1651
+
1652
+ declare const sync: unique symbol;
1653
+
1654
+ /**
1655
+ * Task类型
1656
+ */
1657
+ export declare interface Task {
1658
+ (context: EventChainContext, ...args: any[]): void;
1659
+ }
1660
+
1661
+ /**
1662
+ * 转换为boolean
1663
+ * @param val
1664
+ * @returns
1665
+ */
1666
+ export declare function toBoolean(val: unknown): boolean;
1667
+
1668
+ /**
1669
+ * 转换为number值
1670
+ * @param val
1671
+ * @returns
1672
+ */
1673
+ export declare function toNumber(val: unknown): number;
1674
+
1675
+ export declare const toTypeString: (value: unknown) => string;
1676
+
1677
+ /**
1678
+ * tree接口
1679
+ */
1680
+ declare interface Tree extends TreeNode {
1681
+ /**
1682
+ * 加入数据
1683
+ * @param args
1684
+ * @returns {boolean}
1685
+ */
1686
+ put(...args: any[]): boolean;
1687
+ /**
1688
+ * 获取内容
1689
+ * @param args
1690
+ * @returns {any}
1691
+ */
1692
+ get(...args: any[]): any | undefined;
1693
+ /**
1694
+ * 移除数据
1695
+ * @param args
1696
+ * @returns {boolean}
1697
+ */
1698
+ remove(...args: any[]): boolean;
1699
+ /**
1700
+ * 判断是否包含数据
1701
+ * @param args
1702
+ * @returns {boolean}
1703
+ */
1704
+ contains(...args: any[]): boolean;
1705
+ /**
1706
+ * 清空所以数据
1707
+ */
1708
+ clear(): void;
1709
+ }
1710
+
1711
+ /**
1712
+ * tree node
1713
+ */
1714
+ declare interface TreeNode {
1715
+ [propName: string]: any;
1716
+ [idKey]: string;
1717
+ [valueKey]: any;
1718
+ [growKey]: boolean;
1719
+ [childrenKey]: Map<string, TreeNode>;
1720
+ }
1721
+
1722
+ /**
1723
+ * 判断类型
1724
+ * @param obj
1725
+ * @returns any
1726
+ */
1727
+ export declare function typeOf(obj: any): string;
1728
+
1729
+ declare const _unload: unique symbol;
1730
+
1731
+ declare const _update: unique symbol;
1732
+
1733
+ /**
1734
+ * 更新类型
1735
+ */
1736
+ declare enum UpdateType {
1737
+ /**
1738
+ * 部分替换
1739
+ */
1740
+ Part = 0,
1741
+ /**
1742
+ * 整体替换
1743
+ */
1744
+ All = 1
1745
+ }
1746
+
1747
+ /**
1748
+ * Returns the global bus
1749
+ * @param proxy
1750
+ * @returns
1751
+ */
1752
+ export declare function useBus(proxy?: ComponentPublicInstance): Tree;
1753
+
1754
+ /**
1755
+ * Returns the global event proxy
1756
+ * @param proxy
1757
+ * @returns
1758
+ */
1759
+ export declare function useEventProxy(proxy?: ComponentPublicInstance): EventProxy;
1760
+
1761
+ /**
1762
+ * Returns the current fox
1763
+ * @param proxy
1764
+ * @returns
1765
+ */
1766
+ export declare function useFox(proxy?: ComponentPublicInstance): Fox;
1767
+
1768
+ /**
1769
+ * Returns the current route
1770
+ * @param proxy
1771
+ * @returns
1772
+ */
1773
+ export declare function useRoute(proxy?: ComponentPublicInstance): Route | null;
1774
+
1775
+ /**
1776
+ * Returns the current router
1777
+ * @returns
1778
+ */
1779
+ export declare function useRouter(proxy?: ComponentPublicInstance): Router;
1780
+
1781
+ declare const valueKey: unique symbol;
1782
+
1783
+ /**
1784
+ * 视图
1785
+ */
1786
+ declare class View {
1787
+ /**
1788
+ * model slots列表
1789
+ */
1790
+ private _slots?;
1791
+ /**
1792
+ * getter for models
1793
+ */
1794
+ get slots(): Ref<ModelSlot[]>;
1795
+ /**
1796
+ * 是否为空视图
1797
+ */
1798
+ get empty(): boolean;
1799
+ /**
1800
+ * name
1801
+ */
1802
+ [nameKey]: string;
1803
+ /**
1804
+ * 是否分支根节点标志(true/false)
1805
+ */
1806
+ [rootKey]: boolean;
1807
+ /**
1808
+ * view的所在的root(最近一个)
1809
+ */
1810
+ [rootNodeKey]: ViewPlace | null;
1811
+ /**
1812
+ * view的父亲记得引用(会在router的[sync]方法中建立关系)
1813
+ */
1814
+ [parentNodeKey]: ViewPlace | null;
1815
+ /**
1816
+ * 名称
1817
+ */
1818
+ get name(): string;
1819
+ /**
1820
+ * 构造函数
1821
+ * @param name
1822
+ * @param isRoot
1823
+ * @param rootNodeRef
1824
+ */
1825
+ constructor(name: string, isRoot: boolean, rootNodeRef?: ViewPlace | null);
1826
+ }
1827
+
1828
+ /**
1829
+ * view place
1830
+ */
1831
+ declare class ViewPlace {
1832
+ /**
1833
+ * view
1834
+ */
1835
+ view: View;
1836
+ /**
1837
+ * 索引
1838
+ */
1839
+ index: number;
1840
+ /**
1841
+ * 层次
1842
+ */
1843
+ level: number;
1844
+ /**
1845
+ * 构造函数
1846
+ * @param view
1847
+ * @param index
1848
+ * @param level
1849
+ */
1850
+ constructor(view: View, index: number, level: number);
1851
+ /**
1852
+ * 判断是否在队列中
1853
+ * @param list
1854
+ * @param view
1855
+ */
1856
+ static include(list: ViewPlace[], viewPlace: ViewPlace): boolean;
1857
+ }
1858
+
1859
+ export { }