@fox-js/fox 3.0.1-0 → 3.0.1-10

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