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

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,1866 @@
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
+ * 判断路由的路径是否相同
948
+ * @param x
949
+ * @param y
950
+ * @returns
951
+ */
952
+ static isSameForRoute(x: Route, y: Route): boolean;
953
+ /**
954
+ * 判断路由对应的route model是否一致
955
+ * @param x
956
+ * @param y
957
+ * @returns
958
+ */
959
+ static isSameForRouteModel(x: Route, y: Route): boolean;
960
+ /**
961
+ * 由对象生成路由
962
+ * @param obj
963
+ * @returns
964
+ */
965
+ static from(obj: any): Route;
966
+ }
967
+
968
+ /**
969
+ * 路由配置
970
+ */
971
+ export declare interface RouteConfig {
972
+ /**
973
+ * 路径
974
+ */
975
+ path?: string;
976
+ /**
977
+ * 名称
978
+ */
979
+ name?: string;
980
+ /**
981
+ * 转发路径
982
+ */
983
+ redirect?: string;
984
+ /**
985
+ * 组件
986
+ */
987
+ component?: any;
988
+ /**
989
+ * 组件映射
990
+ */
991
+ components?: {
992
+ [propName: string]: any;
993
+ };
994
+ /**
995
+ * 孩子节点
996
+ */
997
+ children?: any[];
998
+ /**
999
+ * 属性
1000
+ */
1001
+ props?: Record<string | number | symbol, any> | boolean | {
1002
+ (route: Route): any;
1003
+ };
1004
+ /**
1005
+ * 元数据
1006
+ */
1007
+ meta?: Record<string | number | symbol, any>;
1008
+ }
1009
+
1010
+ /**
1011
+ * Route Model(RouteModel > ModelLayer > Model)
1012
+ */
1013
+ declare class RouteModel {
1014
+ /**
1015
+ * 路径
1016
+ */
1017
+ path?: string;
1018
+ /**
1019
+ * 路径match
1020
+ */
1021
+ match: any;
1022
+ /**
1023
+ * 转发路径
1024
+ */
1025
+ redirect?: string;
1026
+ /**
1027
+ * 名称
1028
+ */
1029
+ name?: string;
1030
+ /**
1031
+ * layer集合
1032
+ */
1033
+ layers: ModelLayer[];
1034
+ }
1035
+
1036
+ export declare class Router {
1037
+ /**
1038
+ * 注册表
1039
+ */
1040
+ private [registerKey];
1041
+ /**
1042
+ * not found route
1043
+ */
1044
+ private [notFoundKey]?;
1045
+ /**
1046
+ * not found route path
1047
+ */
1048
+ private [notFoundPathKey];
1049
+ /**
1050
+ * ready
1051
+ */
1052
+ private [readyKey];
1053
+ /**
1054
+ * ready handlers
1055
+ */
1056
+ private [readyHandlersKey];
1057
+ /**
1058
+ * 页面根节点
1059
+ */
1060
+ private [forestKey];
1061
+ /**
1062
+ * 历史记录控制器
1063
+ */
1064
+ private [historyKey]?;
1065
+ /**
1066
+ * 当前路由集合
1067
+ */
1068
+ private [currentRoutes];
1069
+ /**
1070
+ * 错误回调
1071
+ */
1072
+ private [errorCallback];
1073
+ /**
1074
+ * 全局route更新监听器
1075
+ */
1076
+ private [routeUpdatedCallback];
1077
+ /**
1078
+ * before过滤器队列
1079
+ */
1080
+ private [beforeFiltersKey];
1081
+ /**
1082
+ * after过滤器队列
1083
+ */
1084
+ private [afterFiltersKey];
1085
+ /**
1086
+ * destroy过滤器队列
1087
+ */
1088
+ private [destroyFiltersKey];
1089
+ /**
1090
+ * 属性传递过滤器
1091
+ */
1092
+ private [propsFilterKey];
1093
+ /**
1094
+ * 主任务分发器
1095
+ */
1096
+ private [mainDispatcherKey];
1097
+ /**
1098
+ * 路由守护者
1099
+ */
1100
+ private [routerGuardKey];
1101
+ /**
1102
+ * 是否初始化
1103
+ */
1104
+ private [initKey];
1105
+ /**
1106
+ * 当前最新路由
1107
+ */
1108
+ private [currentKey];
1109
+ /**
1110
+ * 获取当前最新route
1111
+ */
1112
+ get current(): Route | null;
1113
+ private options;
1114
+ /**
1115
+ * 构造函数
1116
+ * @param options
1117
+ */
1118
+ constructor(options: RouterOptions);
1119
+ /**
1120
+ * 记录错误日志
1121
+ * @param error
1122
+ * @param route
1123
+ */
1124
+ private [_handleError];
1125
+ /**
1126
+ * 初始化
1127
+ */
1128
+ init(): void;
1129
+ /**
1130
+ * 第一次导航是否完成
1131
+ */
1132
+ isReady(): Promise<void>;
1133
+ /**
1134
+ * 设置第一导航完成
1135
+ */
1136
+ private [_markReady];
1137
+ /**
1138
+ * 处理历史记录
1139
+ * @param record
1140
+ */
1141
+ private [_handleHistoryChange];
1142
+ /**
1143
+ * 处理route updated事件
1144
+ * @param route
1145
+ */
1146
+ private [_handleRouteUpdated];
1147
+ /**
1148
+ * 加入路由记录
1149
+ * @param route
1150
+ */
1151
+ private [_addRouteRecorder];
1152
+ /**
1153
+ * 克隆路由记录
1154
+ * @returns
1155
+ */
1156
+ private [_cloneRouteRecorder];
1157
+ /**
1158
+ * 移除路由记录
1159
+ *
1160
+ * @param route
1161
+ */
1162
+ private [_removeRouteRecorder];
1163
+ /**
1164
+ * 设置history monitor是否启动
1165
+ */
1166
+ set historyMonitor(val: boolean | IfFunction);
1167
+ /**
1168
+ * 获取history monitor
1169
+ */
1170
+ get historyMonitor(): boolean | IfFunction;
1171
+ /**
1172
+ * 设置无痕模式,不改变历史记录
1173
+ */
1174
+ set traceless(val: boolean | IfFunction);
1175
+ /**
1176
+ * 获取无痕模式(不改变历史记录)
1177
+ */
1178
+ get traceless(): boolean | IfFunction;
1179
+ /**
1180
+ * 设置属性传递过滤器
1181
+ */
1182
+ set propsFilter(filter: PropsFilter | null);
1183
+ /**
1184
+ * 获取属性传递过滤器
1185
+ */
1186
+ get propsFilter(): PropsFilter | null;
1187
+ /**
1188
+ * 设置还原点
1189
+ *
1190
+ */
1191
+ setRestorePoint(): void;
1192
+ /**
1193
+ * 注册route updated处理函数
1194
+ * @param callback
1195
+ */
1196
+ onRouteUpdated(callback: {
1197
+ (route?: Route | null): void;
1198
+ } | null): void;
1199
+ /**
1200
+ * 注册全局异常处理函数
1201
+ * @param callback
1202
+ */
1203
+ onError(callback: {
1204
+ (...args: any[]): void;
1205
+ } | null): void;
1206
+ /**
1207
+ * 添加before filter
1208
+ * @param filter
1209
+ */
1210
+ beforeEach(filter: BeforeRouteFilter): void;
1211
+ /**
1212
+ * 移除before filter
1213
+ * @param filter
1214
+ */
1215
+ removeBeforeEach(filter: BeforeRouteFilter): boolean;
1216
+ /**
1217
+ * 添加after filter
1218
+ * @param filter
1219
+ */
1220
+ afterEach(filter: AfterRouteFilter): void;
1221
+ /**
1222
+ * 移除after filter
1223
+ * @param filter
1224
+ * @returns
1225
+ */
1226
+ removeAfterEach(filter: AfterRouteFilter): boolean;
1227
+ /**
1228
+ * 添加destroy filter
1229
+ * @param filter
1230
+ */
1231
+ destroyEach(filter: DestroyRouteFilter): void;
1232
+ /**
1233
+ * 移除after filter
1234
+ * @param filter
1235
+ * @returns
1236
+ */
1237
+ removeDestroyEach(filter: DestroyRouteFilter): boolean;
1238
+ /**
1239
+ * 添加before restore filter
1240
+ * @param filter
1241
+ */
1242
+ beforeRestoreEach(filter: BeforeResotreFilter): void;
1243
+ /**
1244
+ * 移除before restore filter
1245
+ * @param filter
1246
+ * @returns
1247
+ */
1248
+ removeBeforeRestoreEach(filter: BeforeResotreFilter): boolean;
1249
+ /**
1250
+ * 加入路由配置列表
1251
+ * @param routeConfigs
1252
+ */
1253
+ addRoutes(routeConfigs: RouteConfig[]): void;
1254
+ /**
1255
+ * 加入路由配置
1256
+ * @param routeConfig
1257
+ * @param index
1258
+ */
1259
+ addRoute(routeConfig: RouteConfig, index?: number): void;
1260
+ /**
1261
+ * 移除路由
1262
+ *
1263
+ * @param route
1264
+ */
1265
+ removeRoute(route: Route | string): boolean;
1266
+ /**
1267
+ * 判断路由是否存在
1268
+ *
1269
+ * @param route
1270
+ */
1271
+ hasRoute(route: Route | string): boolean;
1272
+ /**
1273
+ * 配置not found路由路径
1274
+ * @param path
1275
+ */
1276
+ setNotFoundPath(path: string): void;
1277
+ /**
1278
+ * 配置not found路由配置
1279
+ * @param routeConfig
1280
+ */
1281
+ setNotFoundRoute(routeConfig: RouteConfig): void;
1282
+ /**
1283
+ * 返回目前加载的routes
1284
+ */
1285
+ getRoutes(): RouteModel[];
1286
+ /**
1287
+ * 根据路由构建route model
1288
+ *
1289
+ * @param routeConfig
1290
+ */
1291
+ private [_constructRouteModel];
1292
+ /**
1293
+ * 查找route model
1294
+ * @param cite
1295
+ */
1296
+ private [_findRouteModel];
1297
+ /**
1298
+ * 解释路由
1299
+ * @param args
1300
+ * @returns
1301
+ */
1302
+ [resolveRoute](args: any): Route | null;
1303
+ /**
1304
+ * 路由跳转(operation类型为Push)
1305
+ * @param args
1306
+ */
1307
+ push(...args: any[]): Router;
1308
+ /**
1309
+ * 路由跳转(operation类型为Put)
1310
+ * @param args
1311
+ */
1312
+ put(...args: any[]): Router;
1313
+ /**
1314
+ * 路由跳转(operation类型为Replace)
1315
+ * @param args
1316
+ */
1317
+ replace(...args: any[]): Router;
1318
+ /**
1319
+ * 路由跳转(operation类型为Append)
1320
+ * @param args
1321
+ */
1322
+ append(...args: any[]): Router;
1323
+ /**
1324
+ * 移除
1325
+ * @param term
1326
+ * @param changeHistory
1327
+ */
1328
+ remove(term?: any, changeHistory?: boolean): Promise<boolean>;
1329
+ /**
1330
+ * 路由跳转(operation类型为Open)
1331
+ * @param args
1332
+ */
1333
+ open(...args: any[]): Router;
1334
+ /**
1335
+ * 关闭路由跳转的页面
1336
+ * @param args
1337
+ */
1338
+ close(args: any): Router;
1339
+ /**
1340
+ * 路由跳转
1341
+ * @param args
1342
+ */
1343
+ to(...args: any[]): Router;
1344
+ /**
1345
+ * 历史回退
1346
+ * @param delta
1347
+ */
1348
+ back(delta?: number): void;
1349
+ /**
1350
+ * 创建next函数
1351
+ */
1352
+ private [_createNextFn];
1353
+ /**
1354
+ * 开始链路
1355
+ * @param route
1356
+ * @returns {EventChain}
1357
+ */
1358
+ private [_start];
1359
+ /**
1360
+ * 执行before事件
1361
+ * @param chain
1362
+ */
1363
+ private [_before];
1364
+ /**
1365
+ * 执行after事件
1366
+ * @param chain
1367
+ */
1368
+ private [_after];
1369
+ /**
1370
+ * 执行销毁事件
1371
+ * @param route
1372
+ * @param session
1373
+ */
1374
+ private [_destroy];
1375
+ /**
1376
+ * 加载路由
1377
+ * @param chain
1378
+ */
1379
+ private [_load];
1380
+ /**
1381
+ * 卸载(只能用于卸载多视图上的view)
1382
+ *
1383
+ * @param routes
1384
+ */
1385
+ private [_unload];
1386
+ /**
1387
+ * 查找root view索引
1388
+ * @param page
1389
+ * @param route
1390
+ */
1391
+ private [_findRootView];
1392
+ /**
1393
+ * 查找first view
1394
+ * @param page
1395
+ */
1396
+ private [_getFirstView];
1397
+ /**
1398
+ * 移除view
1399
+ * @param page
1400
+ * @param pos
1401
+ * @param indexList
1402
+ * @param retainRoot
1403
+ */
1404
+ private [_removeView];
1405
+ /**
1406
+ * 恢复
1407
+ * @param routes
1408
+ *
1409
+ * @returns
1410
+ */
1411
+ restore(routes?: Route[]): Promise<void>;
1412
+ /**
1413
+ * build page
1414
+ * @param route
1415
+ * @param routeModel
1416
+ * @returns
1417
+ */
1418
+ private [_buildPage];
1419
+ /**
1420
+ * 解析组件
1421
+ */
1422
+ private [_resolveComponent];
1423
+ /**
1424
+ * 更新页面
1425
+ * @param routeModel
1426
+ * @param route
1427
+ * @param session
1428
+ * @param updateType
1429
+ * @returns
1430
+ */
1431
+ private [_update];
1432
+ /**
1433
+ * 合并view
1434
+ * @param page
1435
+ * @param startViewLevel
1436
+ * @param routeModel
1437
+ * @param startModelLevel
1438
+ * @param rootNodeRef
1439
+ */
1440
+ [_merge](page: Page, startViewLevel: number, routeModel: RouteModel, startModelLevel: number, rootNodeRef: ViewPlace): void;
1441
+ /**
1442
+ * router view与view同步数据
1443
+ * @param name
1444
+ * @param level
1445
+ * @param rootView
1446
+ * @param rootViewIndex
1447
+ * @param parentView
1448
+ * @param parentViewIndex
1449
+ * @returns
1450
+ */
1451
+ [sync](name: string, level: number, rootView: View | null, rootViewIndex: number, parentView: View | null, parentViewIndex: number): View | null;
1452
+ }
1453
+
1454
+ declare const routerGuardKey: unique symbol;
1455
+
1456
+ /**
1457
+ * Router History
1458
+ */
1459
+ declare interface RouterHistory {
1460
+ /**
1461
+ * 基础路径
1462
+ */
1463
+ base: string;
1464
+ /**
1465
+ * 是否监听history change
1466
+ */
1467
+ historyMonitor: boolean | IfFunction;
1468
+ /**
1469
+ * 是否支持无痕模式
1470
+ */
1471
+ traceless: boolean | IfFunction;
1472
+ /**
1473
+ * 初始化
1474
+ * @param firstNavigate
1475
+ * @returns
1476
+ */
1477
+ init(firstNavigate: boolean): Promise<void>;
1478
+ /**
1479
+ * 销毁
1480
+ */
1481
+ destroy(): void;
1482
+ /**
1483
+ * 添加before restore filter
1484
+ * @param filter
1485
+ */
1486
+ beforeRestoreEach(filter: BeforeResotreFilter): void;
1487
+ /**
1488
+ * 移除before restore filter
1489
+ * @param filter
1490
+ * @returns
1491
+ */
1492
+ removeBeforeRestoreEach(filter: BeforeResotreFilter): boolean;
1493
+ /**
1494
+ * 监听历史记录改变
1495
+ * @param handler
1496
+ */
1497
+ listen(handler: HistoryChangeHandler): void;
1498
+ /**
1499
+ * 跳转
1500
+ * @param delta
1501
+ * @param consume 是否消费事件
1502
+ */
1503
+ go(delta: number, consume?: boolean | {
1504
+ (): boolean;
1505
+ }): void;
1506
+ /**
1507
+ * 回退到指定路由
1508
+ * @param target
1509
+ * @param trigger
1510
+ */
1511
+ goBack(target: Route | null, trigger: Function): void;
1512
+ /**
1513
+ * 加入记录
1514
+ * @param record
1515
+ */
1516
+ push(record: MarkRecord): void;
1517
+ /**
1518
+ * 替换当前记录
1519
+ * @param record
1520
+ */
1521
+ replace(record: MarkRecord): void;
1522
+ /**
1523
+ * 设置还原点
1524
+ *
1525
+ * @param routes 路由记录
1526
+ */
1527
+ setRestorePoint(routes?: Array<Route>): void;
1528
+ }
1529
+
1530
+ /**
1531
+ * router options
1532
+ */
1533
+ export declare interface RouterOptions {
1534
+ /**
1535
+ * 默认操作类型
1536
+ */
1537
+ defaultOperationType?: OperationType;
1538
+ /**
1539
+ * 模块路径解释
1540
+ */
1541
+ modulePathResolve?: {
1542
+ (route: Route): string;
1543
+ };
1544
+ /**
1545
+ * router history
1546
+ */
1547
+ history?: RouterHistory;
1548
+ /**
1549
+ * 路由配置列表
1550
+ */
1551
+ routes?: RouteConfig[];
1552
+ /**
1553
+ * not found 路由
1554
+ */
1555
+ notFound?: RouteConfig;
1556
+ /**
1557
+ * not found 路由路径
1558
+ */
1559
+ notFoundPath?: string;
1560
+ }
1561
+
1562
+ declare const routeUpdatedCallback: unique symbol;
1563
+
1564
+ declare class Session {
1565
+ /**
1566
+ * 目标路由
1567
+ */
1568
+ to?: Route;
1569
+ /**
1570
+ * 目标路由
1571
+ */
1572
+ routeModel?: RouteModel;
1573
+ /**
1574
+ * 来源路由
1575
+ */
1576
+ from?: Route;
1577
+ /**
1578
+ * 流程数据
1579
+ */
1580
+ data: {
1581
+ [propName: string]: any;
1582
+ };
1583
+ /**
1584
+ * 构造函数
1585
+ * @param to
1586
+ * @param from
1587
+ */
1588
+ constructor(to?: Route, from?: Route);
1589
+ /**
1590
+ * 转换为session
1591
+ * @param src
1592
+ * @returns
1593
+ */
1594
+ static from(src: {
1595
+ [propName: string]: any;
1596
+ }): Session;
1597
+ }
1598
+
1599
+ export declare const sessionKey: unique symbol;
1600
+
1601
+ /**
1602
+ * 插槽
1603
+ */
1604
+ declare class Slot {
1605
+ /**
1606
+ * 插槽名称
1607
+ */
1608
+ name: string;
1609
+ /**
1610
+ * 层次
1611
+ */
1612
+ level: number;
1613
+ /**
1614
+ * root插槽节点名称
1615
+ */
1616
+ rootName: string | undefined;
1617
+ /**
1618
+ * root插槽节点index
1619
+ */
1620
+ rootIndex: number;
1621
+ /**
1622
+ * 构造函数
1623
+ * @param name
1624
+ * @param level
1625
+ * @param rootName
1626
+ */
1627
+ constructor(name: string, level: number, rootName: string | undefined, rootIndex: number);
1628
+ }
1629
+
1630
+ declare const _start: unique symbol;
1631
+
1632
+ declare const statusKey: unique symbol;
1633
+
1634
+ /**
1635
+ * storage
1636
+ */
1637
+ declare interface Storage_2 {
1638
+ /**
1639
+ * 获取item
1640
+ * @param key
1641
+ */
1642
+ getItem(key: string): string | null;
1643
+ /**
1644
+ * 设置item
1645
+ * @param key
1646
+ * @param value
1647
+ */
1648
+ setItem(key: string, value: string): void;
1649
+ /**
1650
+ * remove item
1651
+ * @param key
1652
+ */
1653
+ removeItem(key: string): void;
1654
+ }
1655
+ export { Storage_2 as Storage }
1656
+
1657
+ declare const successFnsKey: unique symbol;
1658
+
1659
+ declare const sync: unique symbol;
1660
+
1661
+ /**
1662
+ * Task类型
1663
+ */
1664
+ export declare interface Task {
1665
+ (context: EventChainContext, ...args: any[]): void;
1666
+ }
1667
+
1668
+ /**
1669
+ * 转换为boolean值
1670
+ * @param val
1671
+ * @returns
1672
+ */
1673
+ export declare function toBoolean(val: unknown): boolean;
1674
+
1675
+ /**
1676
+ * 转换为number值
1677
+ * @param val
1678
+ * @returns
1679
+ */
1680
+ export declare function toNumber(val: unknown): number;
1681
+
1682
+ export declare const toTypeString: (value: unknown) => string;
1683
+
1684
+ /**
1685
+ * tree接口
1686
+ */
1687
+ declare interface Tree extends TreeNode {
1688
+ /**
1689
+ * 加入数据
1690
+ * @param args
1691
+ * @returns {boolean}
1692
+ */
1693
+ put(...args: any[]): boolean;
1694
+ /**
1695
+ * 获取内容
1696
+ * @param args
1697
+ * @returns {any}
1698
+ */
1699
+ get(...args: any[]): any | undefined;
1700
+ /**
1701
+ * 移除数据
1702
+ * @param args
1703
+ * @returns {boolean}
1704
+ */
1705
+ remove(...args: any[]): boolean;
1706
+ /**
1707
+ * 判断是否包含数据
1708
+ * @param args
1709
+ * @returns {boolean}
1710
+ */
1711
+ contains(...args: any[]): boolean;
1712
+ /**
1713
+ * 清空所以数据
1714
+ */
1715
+ clear(): void;
1716
+ }
1717
+
1718
+ /**
1719
+ * tree node
1720
+ */
1721
+ declare interface TreeNode {
1722
+ [propName: string]: any;
1723
+ [idKey]: string;
1724
+ [valueKey]: any;
1725
+ [growKey]: boolean;
1726
+ [childrenKey]: Map<string, TreeNode>;
1727
+ }
1728
+
1729
+ /**
1730
+ * 判断类型
1731
+ * @param obj
1732
+ * @returns any
1733
+ */
1734
+ export declare function typeOf(obj: any): string;
1735
+
1736
+ declare const _unload: unique symbol;
1737
+
1738
+ declare const _update: unique symbol;
1739
+
1740
+ /**
1741
+ * 更新类型
1742
+ */
1743
+ declare enum UpdateType {
1744
+ /**
1745
+ * 部分替换
1746
+ */
1747
+ Part = 0,
1748
+ /**
1749
+ * 整体替换
1750
+ */
1751
+ All = 1
1752
+ }
1753
+
1754
+ /**
1755
+ * Returns the global bus
1756
+ * @param proxy
1757
+ * @returns
1758
+ */
1759
+ export declare function useBus(proxy?: ComponentPublicInstance): Tree;
1760
+
1761
+ /**
1762
+ * Returns the global event proxy
1763
+ * @param proxy
1764
+ * @returns
1765
+ */
1766
+ export declare function useEventProxy(proxy?: ComponentPublicInstance): EventProxy;
1767
+
1768
+ /**
1769
+ * Returns the current fox
1770
+ * @param proxy
1771
+ * @returns
1772
+ */
1773
+ export declare function useFox(proxy?: ComponentPublicInstance): Fox;
1774
+
1775
+ /**
1776
+ * Returns the current route
1777
+ * @param proxy
1778
+ * @returns
1779
+ */
1780
+ export declare function useRoute(proxy?: ComponentPublicInstance): Route | null;
1781
+
1782
+ /**
1783
+ * Returns the current router
1784
+ * @returns
1785
+ */
1786
+ export declare function useRouter(proxy?: ComponentPublicInstance): Router;
1787
+
1788
+ declare const valueKey: unique symbol;
1789
+
1790
+ /**
1791
+ * 视图
1792
+ */
1793
+ declare class View {
1794
+ /**
1795
+ * model slots列表
1796
+ */
1797
+ private _slots?;
1798
+ /**
1799
+ * getter for models
1800
+ */
1801
+ get slots(): Ref<ModelSlot[]>;
1802
+ /**
1803
+ * 是否为空视图
1804
+ */
1805
+ get empty(): boolean;
1806
+ /**
1807
+ * name
1808
+ */
1809
+ [nameKey]: string;
1810
+ /**
1811
+ * 是否分支根节点标志(true/false)
1812
+ */
1813
+ [rootKey]: boolean;
1814
+ /**
1815
+ * view的所在的root(最近一个)
1816
+ */
1817
+ [rootNodeKey]: ViewPlace | null;
1818
+ /**
1819
+ * view的父亲记得引用(会在router的[sync]方法中建立关系)
1820
+ */
1821
+ [parentNodeKey]: ViewPlace | null;
1822
+ /**
1823
+ * 名称
1824
+ */
1825
+ get name(): string;
1826
+ /**
1827
+ * 构造函数
1828
+ * @param name
1829
+ * @param isRoot
1830
+ * @param rootNodeRef
1831
+ */
1832
+ constructor(name: string, isRoot: boolean, rootNodeRef?: ViewPlace | null);
1833
+ }
1834
+
1835
+ /**
1836
+ * view place
1837
+ */
1838
+ declare class ViewPlace {
1839
+ /**
1840
+ * view
1841
+ */
1842
+ view: View;
1843
+ /**
1844
+ * 索引
1845
+ */
1846
+ index: number;
1847
+ /**
1848
+ * 层次
1849
+ */
1850
+ level: number;
1851
+ /**
1852
+ * 构造函数
1853
+ * @param view
1854
+ * @param index
1855
+ * @param level
1856
+ */
1857
+ constructor(view: View, index: number, level: number);
1858
+ /**
1859
+ * 判断是否在队列中
1860
+ * @param list
1861
+ * @param view
1862
+ */
1863
+ static include(list: ViewPlace[], viewPlace: ViewPlace): boolean;
1864
+ }
1865
+
1866
+ export { }