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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,14 @@
1
1
  import { App } from 'vue';
2
- import { ComponentInternalInstance } from 'vue';
3
- import { ComponentPublicInstance } from 'vue';
4
- import { InjectionKey } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { DefineComponent } from 'vue';
5
+ import { ExtractPropTypes } from 'vue';
6
+ import { PropType } from 'vue';
7
+ import { PublicProps } from 'vue';
5
8
  import { Ref } from 'vue';
6
- import { Require } from './require';
9
+ import { RendererElement } from 'vue';
10
+ import { RendererNode } from 'vue';
11
+ import { VNode } from 'vue';
7
12
 
8
13
  declare const _addRouteRecorder: unique symbol;
9
14
 
@@ -15,7 +20,7 @@ declare const afterFiltersKey: unique symbol;
15
20
  * after route update filter
16
21
  */
17
22
  declare interface AfterRouteFilter {
18
- (to: Route, from: Route, session: Record<string | number | symbol, any>): void;
23
+ (to: Route, from: Route | null, session: Record<string | number | symbol, any>): void;
19
24
  }
20
25
 
21
26
  declare const argsKey: unique symbol;
@@ -35,11 +40,17 @@ declare interface BeforeResotreFilter {
35
40
  * before route update filter
36
41
  */
37
42
  declare interface BeforeRouteFilter {
38
- (to: Route, from: Route, next: {
43
+ (to: Route, from: Route | null, next: {
39
44
  (pass?: boolean | Route): void;
40
45
  }, session: Record<string | number | symbol, any>): void;
41
46
  }
42
47
 
48
+ /**
49
+ * 在当前scope中绑定Lifecycle context
50
+ * @params 扩展范围引用
51
+ */
52
+ export declare function bindLifecycleContextToCurrentScope(extScopeRefs?: Array<Object>): boolean;
53
+
43
54
  declare const _buildPage: unique symbol;
44
55
 
45
56
  /**
@@ -65,16 +76,6 @@ declare const chainKey: unique symbol;
65
76
 
66
77
  declare const childrenKey: unique symbol;
67
78
 
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
79
  declare const _cloneRouteRecorder: unique symbol;
79
80
 
80
81
  declare const _constructRouteModel: unique symbol;
@@ -119,7 +120,7 @@ export declare function createWebHashHistory(navigateFirstRoute?: boolean, query
119
120
  */
120
121
  export declare function createWebHistory(navigateFirstRoute?: boolean, base?: string | null, query?: string, historyMonitor?: boolean | IfFunction, traceless?: boolean | IfFunction, storage?: Storage_2): RouterHistory;
121
122
 
122
- declare const currentKey: unique symbol;
123
+ declare const currentRoute: unique symbol;
123
124
 
124
125
  declare const currentRoutes: unique symbol;
125
126
 
@@ -128,15 +129,15 @@ declare const cursorKey: unique symbol;
128
129
  /**
129
130
  * 自定义过渡
130
131
  */
131
- export declare type CustomTransition = 'custom';
132
+ declare type CustomTransition = 'custom';
132
133
 
133
134
  /**
134
135
  * 删除 context value
135
- * @param proxy
136
+ * @param contextRelationKey 上下文关联key
136
137
  * @param key
137
138
  *
138
139
  */
139
- export declare function deleteContextValue(proxy: ComponentPublicInstance, key: KeyType_2): void;
140
+ export declare function deleteContextValue(contextRelationKey: FoxContextRelationKey | null, key: KeyType_2, route?: Route): void;
140
141
 
141
142
  declare const _destroy: unique symbol;
142
143
 
@@ -149,6 +150,12 @@ declare interface DestroyRouteFilter {
149
150
  (to: Route, session: Record<string | number | symbol, any>): void;
150
151
  }
151
152
 
153
+ /**
154
+ * 销毁state
155
+ * @param state
156
+ */
157
+ export declare function destroyState(state: Object): void;
158
+
152
159
  /**
153
160
  * 完成Task类型(Exception,Finish, Wait)
154
161
  */
@@ -338,7 +345,7 @@ export declare class EventProxy {
338
345
  * @param callback
339
346
  * @returns
340
347
  */
341
- off(key: string, callback: Callback): EventProxy;
348
+ off(key: string, callback?: Callback): EventProxy;
342
349
  /**
343
350
  * 绑定事件
344
351
  * @param key
@@ -353,7 +360,7 @@ export declare class EventProxy {
353
360
  * @param callback
354
361
  * @returns
355
362
  */
356
- unbind(key: string, callback: Callback): EventProxy;
363
+ unbind(key: string, callback?: Callback): EventProxy;
357
364
  /**
358
365
  * 绑定一次性触发函数
359
366
  * @param key
@@ -432,23 +439,18 @@ export declare interface Fox {
432
439
  * 获取require
433
440
  */
434
441
  get require(): Require;
435
- /**
436
- * 返回extend
437
- */
438
- get extend(): Function;
439
- /**
440
- * 返回clone
441
- */
442
- get clone(): Function;
443
442
  /**
444
443
  * 判断是否为es模块
445
444
  */
446
- get isESModule(): Function;
445
+ get isESModule(): {
446
+ (mod: any): boolean;
447
+ };
447
448
  /**
448
449
  * 安装
449
450
  * @param app
451
+ * @param options
450
452
  */
451
- install(app: App): void;
453
+ install(app: App<Element>, options?: FoxInstallOptions): void;
452
454
  }
453
455
 
454
456
  /**
@@ -462,9 +464,10 @@ export declare const FoxBeforeEnter = "FoxBeforeEnter";
462
464
  export declare const FoxBeforeLeave = "FoxLeave";
463
465
 
464
466
  /**
465
- * 全局Bus
467
+ * FoxContextRelationKey
468
+ * 上下文关联key
466
469
  */
467
- export declare const foxBusKey: FoxInjectionKey<BusInterface>;
470
+ declare type FoxContextRelationKey = Object;
468
471
 
469
472
  /**
470
473
  * Fox过渡进入事件
@@ -472,18 +475,13 @@ export declare const foxBusKey: FoxInjectionKey<BusInterface>;
472
475
  export declare const FoxEnter = "FoxEnter";
473
476
 
474
477
  /**
475
- * 全局Event Proxy
478
+ * Fox安装参数
476
479
  */
477
- export declare const foxEventProxyKey: FoxInjectionKey<EventProxy>;
478
-
479
- declare interface FoxInjectionKey<T> extends InjectionKey<T> {
480
+ declare interface FoxInstallOptions {
481
+ install?: boolean;
482
+ optionsApi?: boolean;
480
483
  }
481
484
 
482
- /**
483
- * 全局Fox
484
- */
485
- export declare const foxKey: FoxInjectionKey<Fox>;
486
-
487
485
  /**
488
486
  * Fox过渡离开事件
489
487
  */
@@ -496,15 +494,15 @@ export declare const FoxLeave = "FoxLeave";
496
494
  export declare const FoxLeaveEnd = "FoxLeaveEnd";
497
495
 
498
496
  /**
499
- * 参数
497
+ * Fox参数
500
498
  */
501
- export declare interface FoxOptions extends RouterOptions {
499
+ declare interface FoxOptions extends RouterOptions {
502
500
  }
503
501
 
504
502
  /**
505
503
  * 通用函数接口
506
504
  */
507
- export declare interface GenericFunction {
505
+ declare interface GenericFunction {
508
506
  (...args: any[]): any;
509
507
  }
510
508
 
@@ -547,10 +545,17 @@ declare const initKey: unique symbol;
547
545
 
548
546
  /**
549
547
  * inject context value
550
- * @param proxy
548
+ * @param contextRelationKey 上下文关联key
549
+ * @param key
551
550
  * @returns
552
551
  */
553
- export declare function injectContextValue(proxy: ComponentPublicInstance, key: KeyType_2): unknown;
552
+ export declare function injectContextValue<T extends unknown>(contextRelationKey: FoxContextRelationKey | null, key: KeyType_2): T | null;
553
+
554
+ /**
555
+ * inject Lifecycle context
556
+ * @param contextRelationKey 上下文关联key
557
+ */
558
+ export declare function injectLifecycleContext(contextRelationKey?: FoxContextRelationKey | null): LifecycleContext | null;
554
559
 
555
560
  /**
556
561
  * 是否数组
@@ -598,10 +603,12 @@ export declare const isMap: (val: unknown) => val is Map<any, any>;
598
603
  * @param val
599
604
  * @returns
600
605
  */
601
- export declare const isNil: (val: unknown) => val is null;
606
+ export declare const isNil: (val: unknown) => val is null | undefined;
602
607
 
603
608
  /**
604
609
  * 是否为object
610
+ * @param val
611
+ * @returns
605
612
  */
606
613
  export declare const isObject: (val: unknown) => val is Record<any, any>;
607
614
 
@@ -640,6 +647,9 @@ export declare const isString: (val: unknown) => val is string;
640
647
  */
641
648
  export declare const isSymbol: (val: unknown) => val is symbol;
642
649
 
650
+ /**
651
+ * 数据类型key
652
+ */
643
653
  declare type KeyType_2 = string | number | Symbol;
644
654
 
645
655
  /**
@@ -652,6 +662,56 @@ declare class Layer {
652
662
  views: View[];
653
663
  }
654
664
 
665
+ /**
666
+ * 生命周期上下文
667
+ */
668
+ declare class LifecycleContext {
669
+ /**
670
+ * 数据列表
671
+ */
672
+ private [registerKey_3];
673
+ /**
674
+ * parent ref
675
+ */
676
+ private [parentKey];
677
+ /**
678
+ * get parent
679
+ */
680
+ get parent(): LifecycleContext | null;
681
+ /**
682
+ * set parent
683
+ */
684
+ set parent(value: LifecycleContext | null);
685
+ /**
686
+ * 构造函数
687
+ */
688
+ constructor();
689
+ /**
690
+ * 设置value
691
+ * @param key
692
+ * @param value
693
+ */
694
+ set(key: KeyType_2, value: any): void;
695
+ /**
696
+ * 获取数据
697
+ * @param key
698
+ * @returns
699
+ */
700
+ get(key: KeyType_2): any;
701
+ /**
702
+ * 是否有对应的数据
703
+ * @param key
704
+ * @returns
705
+ */
706
+ has(key: KeyType_2): boolean;
707
+ /**
708
+ * 删除数据
709
+ * @param key
710
+ * @returns
711
+ */
712
+ delete(key: KeyType_2): boolean;
713
+ }
714
+
655
715
  declare const _load: unique symbol;
656
716
 
657
717
  declare const mainDispatcherKey: unique symbol;
@@ -689,10 +749,6 @@ declare class Model {
689
749
  props: Record<string | number | symbol, any> | boolean | {
690
750
  (route: Route): any;
691
751
  } | undefined;
692
- /**
693
- * 元数据
694
- */
695
- meta?: Record<string | number | symbol, any>;
696
752
  /**
697
753
  * 原始组件数据
698
754
  */
@@ -707,11 +763,10 @@ declare class Model {
707
763
  * @param name
708
764
  * @param src
709
765
  * @param props
710
- * @param meta
711
766
  */
712
767
  constructor(name: string, src: any, props?: Record<string | number | symbol, any> | {
713
768
  (route: Route): any;
714
- } | boolean, meta?: Record<string | number | symbol, any>);
769
+ } | boolean);
715
770
  /**
716
771
  * 是否已经解析完成
717
772
  */
@@ -736,10 +791,6 @@ declare class ModelLayer {
736
791
  * model插槽
737
792
  */
738
793
  declare class ModelSlot {
739
- /**
740
- * 实例
741
- */
742
- instance: ComponentInternalInstance | null;
743
794
  /**
744
795
  * model
745
796
  */
@@ -768,6 +819,8 @@ declare class ModelSlot {
768
819
 
769
820
  declare const nameKey: unique symbol;
770
821
 
822
+ declare const normalizeRoute: unique symbol;
823
+
771
824
  declare const notFoundKey: unique symbol;
772
825
 
773
826
  declare const notFoundPathKey: unique symbol;
@@ -788,8 +841,14 @@ export declare function onBeforeRouteUpdate(callback: {
788
841
  (to: Route, from?: Route): void;
789
842
  }): void;
790
843
 
844
+ /**
845
+ * 导出注册Fox Activated方法
846
+ */
791
847
  export declare const onFoxActivated: (hook: GenericFunction) => void;
792
848
 
849
+ /**
850
+ * 导出注册Fox Inactivated方法
851
+ */
793
852
  export declare const onFoxInactivated: (hook: GenericFunction) => void;
794
853
 
795
854
  /**
@@ -829,24 +888,33 @@ declare class Page {
829
888
  layers: Layer[];
830
889
  }
831
890
 
891
+ /**
892
+ * parent key
893
+ */
894
+ declare const parentKey: unique symbol;
895
+
832
896
  declare const parentNodeKey: unique symbol;
833
897
 
834
898
  declare const persistentModeKey: unique symbol;
835
899
 
836
900
  /**
837
- * 持久化策略
901
+ * 持久化参数
838
902
  */
839
- declare type PersistPolicy = 'memory' | 'session' | 'local' | 'custom';
903
+ declare type PersistOptions = {
904
+ name?: string;
905
+ persistPolicy?: PersistPolicy;
906
+ storage?: Storage_2;
907
+ };
840
908
 
841
909
  /**
842
910
  * 持久化策略
843
911
  */
844
- declare type PersistPolicy_2 = 'memory' | 'session' | 'local' | 'custom';
912
+ declare type PersistPolicy = 'memory' | 'session' | 'local' | 'custom';
845
913
 
846
914
  /**
847
915
  * 属性函数
848
916
  */
849
- export declare type PropFunction = {
917
+ declare type PropFunction = {
850
918
  (route: Route, index: number): any;
851
919
  };
852
920
 
@@ -861,13 +929,11 @@ declare const propsFilterKey: unique symbol;
861
929
 
862
930
  /**
863
931
  * provide context value
864
- * @param proxy
932
+ * @param contextRelationKey 上下文关联key
865
933
  * @param key
866
934
  * @param value
867
935
  */
868
- export declare function provideContextValue(proxy: ComponentPublicInstance, key: KeyType_2, value: any): void;
869
-
870
- declare type Proxy_2 = ComponentPublicInstance | null;
936
+ export declare function provideContextValue(contextRelationKey: FoxContextRelationKey | null, key: KeyType_2, value: any): void;
871
937
 
872
938
  /**
873
939
  * raw state
@@ -875,7 +941,7 @@ declare type Proxy_2 = ComponentPublicInstance | null;
875
941
  * @param options
876
942
  * @returns
877
943
  */
878
- export declare function rawState<T extends Record<string, any>>(state: T, options?: StateOptions): T;
944
+ export declare function rawState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
879
945
 
880
946
  /**
881
947
  * reactive state
@@ -883,7 +949,7 @@ export declare function rawState<T extends Record<string, any>>(state: T, option
883
949
  * @param options
884
950
  * @returns
885
951
  */
886
- export declare function reactiveState<T extends Record<string, any>>(state: T, options?: StateOptions): T;
952
+ export declare function reactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
887
953
 
888
954
  declare const readyHandlersKey: unique symbol;
889
955
 
@@ -893,13 +959,220 @@ declare const registerKey: unique symbol;
893
959
 
894
960
  declare const registerKey_2: unique symbol;
895
961
 
962
+ /**
963
+ * 注册表key
964
+ */
965
+ declare const registerKey_3: unique symbol;
966
+
967
+ /**
968
+ * remove route 条件
969
+ */
970
+ declare interface RemoveRouteCondition {
971
+ all?: boolean;
972
+ until?: string;
973
+ to?: string;
974
+ root?: string;
975
+ }
976
+
896
977
  declare const _removeRouteRecorder: unique symbol;
897
978
 
898
979
  declare const _removeView: unique symbol;
899
980
 
900
- declare const _resolveComponent: unique symbol;
981
+ /**
982
+ * 依赖加载器
983
+ * 支持js(amd、esm格式) 和 css
984
+ */
985
+ declare class Require {
986
+ /**
987
+ * module manager
988
+ */
989
+ private moduleManager;
990
+ /**
991
+ * 路径别名
992
+ */
993
+ private _alias;
994
+ set alias(alias: Record<string, string>);
995
+ get alias(): Record<string, string>;
996
+ private _resourceParser?;
997
+ set resourceParser(parser: RequireResourceParser);
998
+ get resourceParser(): RequireResourceParser | undefined;
999
+ /**
1000
+ * 设置超时时间
1001
+ */
1002
+ private _timeout?;
1003
+ set timeout(time: number);
1004
+ get timeout(): number | undefined;
1005
+ /**
1006
+ * 设置query
1007
+ */
1008
+ private _query?;
1009
+ set query(val: Record<string, string>);
1010
+ get query(): Record<string, string> | undefined;
1011
+ /**
1012
+ * 获取document head
1013
+ */
1014
+ get head(): any;
1015
+ /**
1016
+ * css挂载点
1017
+ */
1018
+ private _cssMountPoint;
1019
+ set cssMountPoint(point: any);
1020
+ get cssMountPoint(): any;
1021
+ /**
1022
+ * js挂载点
1023
+ */
1024
+ private _jsMountPoint;
1025
+ set jsMountPoint(point: any);
1026
+ get jsMountPoint(): any;
1027
+ /**
1028
+ * 设置module
1029
+ * @param id
1030
+ * @param exports
1031
+ */
1032
+ setModule(id: string | RegExp, exports: any | {
1033
+ (): any;
1034
+ }): void;
1035
+ /**
1036
+ * 移除module
1037
+ * @param id
1038
+ */
1039
+ removeModule(id: string | RegExp): void;
1040
+ /**
1041
+ * 获取module exports
1042
+ * @param id
1043
+ * @returns
1044
+ */
1045
+ getModuleExports(id: string): any;
1046
+ /**
1047
+ * expose require方法
1048
+ * @param name
1049
+ * @param global
1050
+ * @param debug
1051
+ * @returns
1052
+ */
1053
+ exposeRequire(name?: string, global?: any, debug?: boolean): boolean;
1054
+ /**
1055
+ * reslove resource
1056
+ */
1057
+ private resloveResource;
1058
+ /**
1059
+ * 加载
1060
+ * @params args
1061
+ */
1062
+ ensure(...args: [...any[]] | [...any[], RequireMountedCallback]): Promise<any[]>;
1063
+ /**
1064
+ * 卸载
1065
+ */
1066
+ remove(...args: [...any[]] | [...any[], RequireUnMountedCallback]): Promise<boolean>;
1067
+ /**
1068
+ * 加载
1069
+ *
1070
+ * @param chain
1071
+ * @param taskNode
1072
+ */
1073
+ private mount;
1074
+ /**
1075
+ * 加载css
1076
+ * @param chain
1077
+ * @param task
1078
+ * @param point
1079
+ */
1080
+ private mountCSS;
1081
+ /**
1082
+ * 加载js
1083
+ *
1084
+ * @param chain
1085
+ * @param task
1086
+ * @param point
1087
+ */
1088
+ private mountJS;
1089
+ /**
1090
+ * 加载cjs
1091
+ *
1092
+ * @param chain
1093
+ * @param task
1094
+ */
1095
+ private mountCJS;
1096
+ /**
1097
+ * 卸载资源
1098
+ */
1099
+ private unmount;
1100
+ /**
1101
+ * 去掉空元素
1102
+ */
1103
+ private trimEmptyElement;
1104
+ /**
1105
+ * 创建define函数
1106
+ * @param module
1107
+ * @param requireLoad
1108
+ * @param task
1109
+ * @returns
1110
+ */
1111
+ private createDefine;
1112
+ /**
1113
+ * 创建require 加载函数
1114
+ * @returns
1115
+ */
1116
+ private createRequireLoad;
1117
+ /**
1118
+ * 构建资源uri
1119
+ * @param uri
1120
+ * @returns
1121
+ */
1122
+ private constructResourceUri;
1123
+ /**
1124
+ * 创建search字符串
1125
+ */
1126
+ private createSearch;
1127
+ /**
1128
+ * 获取资源路径的后缀
1129
+ * @param name
1130
+ * @returns
1131
+ */
1132
+ private getResourcePathSuffix;
1133
+ }
901
1134
 
902
- declare const resolveRoute: unique symbol;
1135
+ /**
1136
+ * require mount callback
1137
+ */
1138
+ declare interface RequireMountedCallback {
1139
+ (ret: boolean): void;
1140
+ }
1141
+
1142
+ /**
1143
+ * 资源
1144
+ */
1145
+ declare interface RequireResource {
1146
+ path: string;
1147
+ type?: RequireResourceType;
1148
+ format?: RequireResourceFormat;
1149
+ }
1150
+
1151
+ /**
1152
+ * 资源类型
1153
+ */
1154
+ declare type RequireResourceFormat = 'es' | 'umd';
1155
+
1156
+ /**
1157
+ * 资源解析
1158
+ */
1159
+ declare interface RequireResourceParser {
1160
+ (path: string): RequireResource | null;
1161
+ }
1162
+
1163
+ /**
1164
+ * 资源类型
1165
+ */
1166
+ declare type RequireResourceType = 'js' | 'css';
1167
+
1168
+ /**
1169
+ * require unmount callback
1170
+ */
1171
+ declare interface RequireUnMountedCallback {
1172
+ (): void;
1173
+ }
1174
+
1175
+ declare const _resolveComponent: unique symbol;
903
1176
 
904
1177
  declare const rootKey: unique symbol;
905
1178
 
@@ -948,9 +1221,7 @@ export declare class Route {
948
1221
  /**
949
1222
  * 获取匹配的元数组列表
950
1223
  */
951
- matched?: {
952
- meta: Record<string | number | symbol, any>;
953
- }[];
1224
+ matched?: Array<Route>;
954
1225
  /**
955
1226
  * route本身的元数据
956
1227
  */
@@ -1001,10 +1272,6 @@ export declare class Route {
1001
1272
  * 插槽(用于历史还原)
1002
1273
  */
1003
1274
  slot?: Slot;
1004
- /**
1005
- * session(router执行链路session)
1006
- */
1007
- session?: Session;
1008
1275
  /**
1009
1276
  * 克隆
1010
1277
  * @param target
@@ -1019,12 +1286,13 @@ export declare class Route {
1019
1286
  */
1020
1287
  static isSame(x: Route, y: Route): boolean;
1021
1288
  /**
1022
- * 判断路由对应的route model是否一致
1289
+ * 判断路由路径是一致
1290
+ * route.name 一致 or route.path一致
1023
1291
  * @param x
1024
1292
  * @param y
1025
1293
  * @returns
1026
1294
  */
1027
- static isSameForRouteModel(x: Route, y: Route): boolean;
1295
+ static isSamePathForRoute(x: Route | null, y: Route | null): boolean;
1028
1296
  /**
1029
1297
  * 由对象生成路由
1030
1298
  * @param obj
@@ -1095,6 +1363,14 @@ declare class RouteModel {
1095
1363
  * 名称
1096
1364
  */
1097
1365
  name?: string;
1366
+ /**
1367
+ * 元数据
1368
+ */
1369
+ meta?: Record<string | number | symbol, any>;
1370
+ /**
1371
+ * matched routes 当前路由及其所有父路由的匹配记录
1372
+ */
1373
+ matchedRoutes?: Array<Route>;
1098
1374
  /**
1099
1375
  * layer集合
1100
1376
  */
@@ -1134,6 +1410,14 @@ export declare class Router {
1134
1410
  * 当前路由集合
1135
1411
  */
1136
1412
  private [currentRoutes];
1413
+ /**
1414
+ * 当前路由
1415
+ */
1416
+ private [currentRoute];
1417
+ /**
1418
+ * route sessin key
1419
+ */
1420
+ private [routeSessionCacheKey];
1137
1421
  /**
1138
1422
  * 错误回调
1139
1423
  */
@@ -1170,14 +1454,174 @@ export declare class Router {
1170
1454
  * 是否初始化
1171
1455
  */
1172
1456
  private [initKey];
1173
- /**
1174
- * 当前最新路由
1175
- */
1176
- private [currentKey];
1177
1457
  /**
1178
1458
  * 获取当前最新route
1179
1459
  */
1180
- get current(): Route | null;
1460
+ get currentRoute(): Readonly< Ref<{
1461
+ readonly path?: string | undefined;
1462
+ readonly fullPath?: string | undefined;
1463
+ readonly alias?: string | undefined;
1464
+ readonly name?: string | undefined;
1465
+ readonly root?: string | undefined;
1466
+ readonly params?: {
1467
+ readonly [x: string]: any;
1468
+ readonly [x: number]: any;
1469
+ readonly [x: symbol]: any;
1470
+ } | undefined;
1471
+ readonly query?: any;
1472
+ readonly traceless?: boolean | undefined;
1473
+ readonly template?: string | undefined;
1474
+ readonly matched?: readonly {
1475
+ readonly path?: string | undefined;
1476
+ readonly fullPath: string;
1477
+ readonly alias?: string | undefined;
1478
+ readonly name?: string | undefined;
1479
+ readonly root?: string | undefined;
1480
+ readonly params?: {
1481
+ readonly [x: string]: any;
1482
+ readonly [x: number]: any;
1483
+ readonly [x: symbol]: any;
1484
+ } | undefined;
1485
+ readonly query?: any;
1486
+ readonly traceless?: boolean | undefined;
1487
+ readonly template?: string | undefined;
1488
+ readonly matched?: readonly /*elided*/ any[] | undefined;
1489
+ readonly meta?: {
1490
+ readonly [x: string]: any;
1491
+ readonly [x: number]: any;
1492
+ readonly [x: symbol]: any;
1493
+ } | undefined;
1494
+ readonly success?: {
1495
+ (...arg: any[]): void;
1496
+ } | undefined;
1497
+ readonly error?: {
1498
+ (...arg: any[]): void;
1499
+ } | undefined;
1500
+ readonly destroy?: {
1501
+ (...arg: any[]): void;
1502
+ } | undefined;
1503
+ readonly opsType?: OperationType | undefined;
1504
+ readonly updateType?: UpdateType | undefined;
1505
+ readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
1506
+ readonly viewTagAttrs?: any;
1507
+ readonly index?: number | undefined;
1508
+ readonly active?: boolean | undefined;
1509
+ readonly slot?: {
1510
+ readonly name: string;
1511
+ readonly level: number;
1512
+ readonly rootName: string | undefined;
1513
+ readonly rootIndex: number;
1514
+ } | undefined;
1515
+ }[] | undefined;
1516
+ readonly meta?: {
1517
+ readonly [x: string]: any;
1518
+ readonly [x: number]: any;
1519
+ readonly [x: symbol]: any;
1520
+ } | undefined;
1521
+ readonly success?: {
1522
+ (...arg: any[]): void;
1523
+ } | undefined;
1524
+ readonly error?: {
1525
+ (...arg: any[]): void;
1526
+ } | undefined;
1527
+ readonly destroy?: {
1528
+ (...arg: any[]): void;
1529
+ } | undefined;
1530
+ readonly opsType?: OperationType | undefined;
1531
+ readonly updateType?: UpdateType | undefined;
1532
+ readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
1533
+ readonly viewTagAttrs?: any;
1534
+ readonly index?: number | undefined;
1535
+ readonly active?: boolean | undefined;
1536
+ readonly slot?: {
1537
+ readonly name: string;
1538
+ readonly level: number;
1539
+ readonly rootName: string | undefined;
1540
+ readonly rootIndex: number;
1541
+ } | undefined;
1542
+ } | null, {
1543
+ readonly path?: string | undefined;
1544
+ readonly fullPath?: string | undefined;
1545
+ readonly alias?: string | undefined;
1546
+ readonly name?: string | undefined;
1547
+ readonly root?: string | undefined;
1548
+ readonly params?: {
1549
+ readonly [x: string]: any;
1550
+ readonly [x: number]: any;
1551
+ readonly [x: symbol]: any;
1552
+ } | undefined;
1553
+ readonly query?: any;
1554
+ readonly traceless?: boolean | undefined;
1555
+ readonly template?: string | undefined;
1556
+ readonly matched?: readonly {
1557
+ readonly path?: string | undefined;
1558
+ readonly fullPath: string;
1559
+ readonly alias?: string | undefined;
1560
+ readonly name?: string | undefined;
1561
+ readonly root?: string | undefined;
1562
+ readonly params?: {
1563
+ readonly [x: string]: any;
1564
+ readonly [x: number]: any;
1565
+ readonly [x: symbol]: any;
1566
+ } | undefined;
1567
+ readonly query?: any;
1568
+ readonly traceless?: boolean | undefined;
1569
+ readonly template?: string | undefined;
1570
+ readonly matched?: readonly /*elided*/ any[] | undefined;
1571
+ readonly meta?: {
1572
+ readonly [x: string]: any;
1573
+ readonly [x: number]: any;
1574
+ readonly [x: symbol]: any;
1575
+ } | undefined;
1576
+ readonly success?: {
1577
+ (...arg: any[]): void;
1578
+ } | undefined;
1579
+ readonly error?: {
1580
+ (...arg: any[]): void;
1581
+ } | undefined;
1582
+ readonly destroy?: {
1583
+ (...arg: any[]): void;
1584
+ } | undefined;
1585
+ readonly opsType?: OperationType | undefined;
1586
+ readonly updateType?: UpdateType | undefined;
1587
+ readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
1588
+ readonly viewTagAttrs?: any;
1589
+ readonly index?: number | undefined;
1590
+ readonly active?: boolean | undefined;
1591
+ readonly slot?: {
1592
+ readonly name: string;
1593
+ readonly level: number;
1594
+ readonly rootName: string | undefined;
1595
+ readonly rootIndex: number;
1596
+ } | undefined;
1597
+ }[] | undefined;
1598
+ readonly meta?: {
1599
+ readonly [x: string]: any;
1600
+ readonly [x: number]: any;
1601
+ readonly [x: symbol]: any;
1602
+ } | undefined;
1603
+ readonly success?: {
1604
+ (...arg: any[]): void;
1605
+ } | undefined;
1606
+ readonly error?: {
1607
+ (...arg: any[]): void;
1608
+ } | undefined;
1609
+ readonly destroy?: {
1610
+ (...arg: any[]): void;
1611
+ } | undefined;
1612
+ readonly opsType?: OperationType | undefined;
1613
+ readonly updateType?: UpdateType | undefined;
1614
+ readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
1615
+ readonly viewTagAttrs?: any;
1616
+ readonly index?: number | undefined;
1617
+ readonly active?: boolean | undefined;
1618
+ readonly slot?: {
1619
+ readonly name: string;
1620
+ readonly level: number;
1621
+ readonly rootName: string | undefined;
1622
+ readonly rootIndex: number;
1623
+ } | undefined;
1624
+ } | null>>;
1181
1625
  private options;
1182
1626
  /**
1183
1627
  * 构造函数
@@ -1194,6 +1638,10 @@ export declare class Router {
1194
1638
  * 初始化
1195
1639
  */
1196
1640
  init(): void;
1641
+ /**
1642
+ * 销毁
1643
+ */
1644
+ destroy(): void;
1197
1645
  /**
1198
1646
  * 第一次导航是否完成
1199
1647
  */
@@ -1363,11 +1811,11 @@ export declare class Router {
1363
1811
  */
1364
1812
  private [_findRouteModel];
1365
1813
  /**
1366
- * 解释路由
1814
+ * 解析并格式化路由
1367
1815
  * @param args
1368
1816
  * @returns
1369
1817
  */
1370
- [resolveRoute](args: any): Route | null;
1818
+ [normalizeRoute](args: any): Route | null;
1371
1819
  /**
1372
1820
  * 路由跳转(operation类型为Push)
1373
1821
  * @param args
@@ -1393,7 +1841,7 @@ export declare class Router {
1393
1841
  * @param term
1394
1842
  * @param changeHistory
1395
1843
  */
1396
- remove(term?: any, changeHistory?: boolean): Promise<boolean>;
1844
+ remove(term?: RemoveRouteCondition, changeHistory?: boolean): Promise<boolean>;
1397
1845
  /**
1398
1846
  * 路由跳转(operation类型为Open)
1399
1847
  * @param args
@@ -1600,6 +2048,82 @@ declare interface RouterHistory {
1600
2048
  setRestorePoint(routes?: Array<Route>): void;
1601
2049
  }
1602
2050
 
2051
+ /**
2052
+ * router link
2053
+ */
2054
+ export declare let RouterLink: DefineComponent<ExtractPropTypes<{
2055
+ tag: {
2056
+ type: PropType<string | unknown | GenericFunction>;
2057
+ required: false;
2058
+ default: string;
2059
+ };
2060
+ to: {
2061
+ type: PropType<string | unknown | GenericFunction>;
2062
+ required: true;
2063
+ };
2064
+ root: {
2065
+ type: PropType<string>;
2066
+ };
2067
+ activeClass: {
2068
+ type: PropType<string | GenericFunction>;
2069
+ required: false;
2070
+ default: string;
2071
+ };
2072
+ exact: {
2073
+ type: PropType<string | boolean | GenericFunction>;
2074
+ required: false;
2075
+ };
2076
+ exactActiveClass: {
2077
+ type: PropType<string | GenericFunction>;
2078
+ required: false;
2079
+ default: string;
2080
+ };
2081
+ event: {
2082
+ type: PropType<string | GenericFunction>;
2083
+ required: false;
2084
+ default: string;
2085
+ };
2086
+ }>, () => VNode<RendererNode, RendererElement, {
2087
+ [key: string]: any;
2088
+ }> | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2089
+ tag: {
2090
+ type: PropType<string | unknown | GenericFunction>;
2091
+ required: false;
2092
+ default: string;
2093
+ };
2094
+ to: {
2095
+ type: PropType<string | unknown | GenericFunction>;
2096
+ required: true;
2097
+ };
2098
+ root: {
2099
+ type: PropType<string>;
2100
+ };
2101
+ activeClass: {
2102
+ type: PropType<string | GenericFunction>;
2103
+ required: false;
2104
+ default: string;
2105
+ };
2106
+ exact: {
2107
+ type: PropType<string | boolean | GenericFunction>;
2108
+ required: false;
2109
+ };
2110
+ exactActiveClass: {
2111
+ type: PropType<string | GenericFunction>;
2112
+ required: false;
2113
+ default: string;
2114
+ };
2115
+ event: {
2116
+ type: PropType<string | GenericFunction>;
2117
+ required: false;
2118
+ default: string;
2119
+ };
2120
+ }>> & Readonly<{}>, {
2121
+ tag: string;
2122
+ activeClass: string | GenericFunction;
2123
+ exactActiveClass: string | GenericFunction;
2124
+ event: string | GenericFunction;
2125
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2126
+
1603
2127
  /**
1604
2128
  * router options
1605
2129
  */
@@ -1632,44 +2156,371 @@ export declare interface RouterOptions {
1632
2156
  notFoundPath?: string;
1633
2157
  }
1634
2158
 
1635
- declare const routeUpdatedCallback: unique symbol;
1636
-
1637
- declare class Session {
1638
- /**
1639
- * 目标路由
1640
- */
1641
- to?: Route;
1642
- /**
1643
- * 目标路由
1644
- */
1645
- routeModel?: RouteModel;
1646
- /**
1647
- * 来源路由
1648
- */
1649
- from?: Route;
1650
- /**
1651
- * 流程数据
1652
- */
1653
- data: {
1654
- [propName: string]: any;
2159
+ /**
2160
+ * router view
2161
+ */
2162
+ export declare const RouterView: DefineComponent<ExtractPropTypes<{
2163
+ name: {
2164
+ type: PropType<string>;
2165
+ required: false;
2166
+ default: string;
1655
2167
  };
1656
- /**
1657
- * 构造函数
1658
- * @param to
1659
- * @param from
1660
- */
1661
- constructor(to?: Route, from?: Route);
1662
- /**
1663
- * 转换为session
1664
- * @param src
1665
- * @returns
1666
- */
1667
- static from(src: {
1668
- [propName: string]: any;
1669
- }): Session;
1670
- }
2168
+ modelSlot: {
2169
+ type: PropType<ModelSlot>;
2170
+ required: false;
2171
+ };
2172
+ multi: {
2173
+ type: PropType<boolean>;
2174
+ required: false;
2175
+ default: boolean;
2176
+ };
2177
+ tag: {
2178
+ type: PropType<string | unknown | PropFunction>;
2179
+ required: false;
2180
+ default: string;
2181
+ };
2182
+ viewTag: {
2183
+ type: PropType<string | unknown | PropFunction>;
2184
+ required: false;
2185
+ default: string;
2186
+ };
2187
+ viewTagProps: {
2188
+ type: PropType<unknown | PropFunction>;
2189
+ required: false;
2190
+ default(): {};
2191
+ };
2192
+ viewClass: {
2193
+ type: PropType<string | PropFunction>;
2194
+ required: false;
2195
+ };
2196
+ viewActiveClass: {
2197
+ type: PropType<string | PropFunction>;
2198
+ required: false;
2199
+ };
2200
+ viewInactiveClass: {
2201
+ type: PropType<string | PropFunction>;
2202
+ required: false;
2203
+ };
2204
+ transition: {
2205
+ type: PropType<TransitionProp>;
2206
+ required: false;
2207
+ default: boolean;
2208
+ };
2209
+ transitionName: {
2210
+ type: PropType<string>;
2211
+ required: false;
2212
+ };
2213
+ transitionDuration: {
2214
+ type: PropType<string | number | {
2215
+ enter: number;
2216
+ leave: number;
2217
+ show: number;
2218
+ hide: number;
2219
+ }>;
2220
+ required: false;
2221
+ };
2222
+ enterFromClass: {
2223
+ type: PropType<string>;
2224
+ required: false;
2225
+ };
2226
+ enterActiveClass: {
2227
+ type: PropType<string>;
2228
+ required: false;
2229
+ };
2230
+ enterToClass: {
2231
+ type: PropType<string>;
2232
+ required: false;
2233
+ };
2234
+ leaveFromClass: {
2235
+ type: PropType<string>;
2236
+ required: false;
2237
+ };
2238
+ leaveActiveClass: {
2239
+ type: PropType<string>;
2240
+ required: false;
2241
+ };
2242
+ leaveToClass: {
2243
+ type: PropType<string>;
2244
+ required: false;
2245
+ };
2246
+ showFromClass: {
2247
+ type: PropType<string>;
2248
+ required: false;
2249
+ };
2250
+ showActiveClass: {
2251
+ type: PropType<string>;
2252
+ required: false;
2253
+ };
2254
+ showToClass: {
2255
+ type: PropType<string>;
2256
+ required: false;
2257
+ };
2258
+ hideFromClass: {
2259
+ type: PropType<string>;
2260
+ required: false;
2261
+ };
2262
+ hideActiveClass: {
2263
+ type: PropType<string>;
2264
+ required: false;
2265
+ };
2266
+ hideToClass: {
2267
+ type: PropType<string>;
2268
+ required: false;
2269
+ };
2270
+ beforeEnter: {
2271
+ type: PropType<PropFunction>;
2272
+ required: false;
2273
+ };
2274
+ enter: {
2275
+ type: PropType<PropFunction>;
2276
+ required: false;
2277
+ };
2278
+ afterEnter: {
2279
+ type: PropType<PropFunction>;
2280
+ required: false;
2281
+ };
2282
+ enterCancelled: {
2283
+ type: PropType<PropFunction>;
2284
+ required: false;
2285
+ };
2286
+ beforeLeave: {
2287
+ type: PropType<PropFunction>;
2288
+ required: false;
2289
+ };
2290
+ leave: {
2291
+ type: PropType<PropFunction>;
2292
+ required: false;
2293
+ };
2294
+ afterLeave: {
2295
+ type: PropType<PropFunction>;
2296
+ required: false;
2297
+ };
2298
+ leaveCancelled: {
2299
+ type: PropType<PropFunction>;
2300
+ required: false;
2301
+ };
2302
+ beforeShow: {
2303
+ type: PropType<PropFunction>;
2304
+ required: false;
2305
+ };
2306
+ show: {
2307
+ type: PropType<PropFunction>;
2308
+ required: false;
2309
+ };
2310
+ afterShow: {
2311
+ type: PropType<PropFunction>;
2312
+ required: false;
2313
+ };
2314
+ showCancelled: {
2315
+ type: PropType<PropFunction>;
2316
+ required: false;
2317
+ };
2318
+ beforeHide: {
2319
+ type: PropType<PropFunction>;
2320
+ required: false;
2321
+ };
2322
+ hide: {
2323
+ type: PropType<PropFunction>;
2324
+ required: false;
2325
+ };
2326
+ afterHide: {
2327
+ type: PropType<PropFunction>;
2328
+ required: false;
2329
+ };
2330
+ hideCancelled: {
2331
+ type: PropType<PropFunction>;
2332
+ required: false;
2333
+ };
2334
+ }>, (() => VNode< RendererNode, RendererElement, {
2335
+ [key: string]: any;
2336
+ }> | VNode< RendererNode, RendererElement, {
2337
+ [key: string]: any;
2338
+ }>[] | null) | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2339
+ name: {
2340
+ type: PropType<string>;
2341
+ required: false;
2342
+ default: string;
2343
+ };
2344
+ modelSlot: {
2345
+ type: PropType<ModelSlot>;
2346
+ required: false;
2347
+ };
2348
+ multi: {
2349
+ type: PropType<boolean>;
2350
+ required: false;
2351
+ default: boolean;
2352
+ };
2353
+ tag: {
2354
+ type: PropType<string | unknown | PropFunction>;
2355
+ required: false;
2356
+ default: string;
2357
+ };
2358
+ viewTag: {
2359
+ type: PropType<string | unknown | PropFunction>;
2360
+ required: false;
2361
+ default: string;
2362
+ };
2363
+ viewTagProps: {
2364
+ type: PropType<unknown | PropFunction>;
2365
+ required: false;
2366
+ default(): {};
2367
+ };
2368
+ viewClass: {
2369
+ type: PropType<string | PropFunction>;
2370
+ required: false;
2371
+ };
2372
+ viewActiveClass: {
2373
+ type: PropType<string | PropFunction>;
2374
+ required: false;
2375
+ };
2376
+ viewInactiveClass: {
2377
+ type: PropType<string | PropFunction>;
2378
+ required: false;
2379
+ };
2380
+ transition: {
2381
+ type: PropType<TransitionProp>;
2382
+ required: false;
2383
+ default: boolean;
2384
+ };
2385
+ transitionName: {
2386
+ type: PropType<string>;
2387
+ required: false;
2388
+ };
2389
+ transitionDuration: {
2390
+ type: PropType<string | number | {
2391
+ enter: number;
2392
+ leave: number;
2393
+ show: number;
2394
+ hide: number;
2395
+ }>;
2396
+ required: false;
2397
+ };
2398
+ enterFromClass: {
2399
+ type: PropType<string>;
2400
+ required: false;
2401
+ };
2402
+ enterActiveClass: {
2403
+ type: PropType<string>;
2404
+ required: false;
2405
+ };
2406
+ enterToClass: {
2407
+ type: PropType<string>;
2408
+ required: false;
2409
+ };
2410
+ leaveFromClass: {
2411
+ type: PropType<string>;
2412
+ required: false;
2413
+ };
2414
+ leaveActiveClass: {
2415
+ type: PropType<string>;
2416
+ required: false;
2417
+ };
2418
+ leaveToClass: {
2419
+ type: PropType<string>;
2420
+ required: false;
2421
+ };
2422
+ showFromClass: {
2423
+ type: PropType<string>;
2424
+ required: false;
2425
+ };
2426
+ showActiveClass: {
2427
+ type: PropType<string>;
2428
+ required: false;
2429
+ };
2430
+ showToClass: {
2431
+ type: PropType<string>;
2432
+ required: false;
2433
+ };
2434
+ hideFromClass: {
2435
+ type: PropType<string>;
2436
+ required: false;
2437
+ };
2438
+ hideActiveClass: {
2439
+ type: PropType<string>;
2440
+ required: false;
2441
+ };
2442
+ hideToClass: {
2443
+ type: PropType<string>;
2444
+ required: false;
2445
+ };
2446
+ beforeEnter: {
2447
+ type: PropType<PropFunction>;
2448
+ required: false;
2449
+ };
2450
+ enter: {
2451
+ type: PropType<PropFunction>;
2452
+ required: false;
2453
+ };
2454
+ afterEnter: {
2455
+ type: PropType<PropFunction>;
2456
+ required: false;
2457
+ };
2458
+ enterCancelled: {
2459
+ type: PropType<PropFunction>;
2460
+ required: false;
2461
+ };
2462
+ beforeLeave: {
2463
+ type: PropType<PropFunction>;
2464
+ required: false;
2465
+ };
2466
+ leave: {
2467
+ type: PropType<PropFunction>;
2468
+ required: false;
2469
+ };
2470
+ afterLeave: {
2471
+ type: PropType<PropFunction>;
2472
+ required: false;
2473
+ };
2474
+ leaveCancelled: {
2475
+ type: PropType<PropFunction>;
2476
+ required: false;
2477
+ };
2478
+ beforeShow: {
2479
+ type: PropType<PropFunction>;
2480
+ required: false;
2481
+ };
2482
+ show: {
2483
+ type: PropType<PropFunction>;
2484
+ required: false;
2485
+ };
2486
+ afterShow: {
2487
+ type: PropType<PropFunction>;
2488
+ required: false;
2489
+ };
2490
+ showCancelled: {
2491
+ type: PropType<PropFunction>;
2492
+ required: false;
2493
+ };
2494
+ beforeHide: {
2495
+ type: PropType<PropFunction>;
2496
+ required: false;
2497
+ };
2498
+ hide: {
2499
+ type: PropType<PropFunction>;
2500
+ required: false;
2501
+ };
2502
+ afterHide: {
2503
+ type: PropType<PropFunction>;
2504
+ required: false;
2505
+ };
2506
+ hideCancelled: {
2507
+ type: PropType<PropFunction>;
2508
+ required: false;
2509
+ };
2510
+ }>> & Readonly<{}>, {
2511
+ name: string;
2512
+ multi: boolean;
2513
+ tag: string;
2514
+ viewTag: string;
2515
+ viewTagProps: {};
2516
+ transition: TransitionProp;
2517
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2518
+
2519
+ declare const routeSessionCacheKey: unique symbol;
2520
+
2521
+ declare const routeUpdatedCallback: unique symbol;
1671
2522
 
1672
- export declare const sessionKey: unique symbol;
2523
+ declare const sessionKey: unique symbol;
1673
2524
 
1674
2525
  /**
1675
2526
  * shallow reactive state
@@ -1677,7 +2528,7 @@ export declare const sessionKey: unique symbol;
1677
2528
  * @param options
1678
2529
  * @returns
1679
2530
  */
1680
- export declare function shallowReactiveState<T extends Record<string, any>>(state: T, options?: StateOptions): T;
2531
+ export declare function shallowReactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
1681
2532
 
1682
2533
  /**
1683
2534
  * 插槽
@@ -1713,14 +2564,19 @@ declare const _start: unique symbol;
1713
2564
  /**
1714
2565
  * state参数
1715
2566
  */
1716
- export declare type StateOptions = {
2567
+ export declare type StatePersistOptions = {
1717
2568
  name?: string;
1718
- persistPolicy?: PersistPolicy_2;
2569
+ persistPolicy?: StatePersistPolicy;
1719
2570
  storage?: Storage;
1720
2571
  debounce?: boolean;
1721
2572
  debounceDelay?: number;
1722
2573
  };
1723
2574
 
2575
+ /**
2576
+ * 持久化策略
2577
+ */
2578
+ declare type StatePersistPolicy = 'memory' | 'session' | 'local' | 'custom';
2579
+
1724
2580
  declare const statusKey: unique symbol;
1725
2581
 
1726
2582
  /**
@@ -1744,7 +2600,6 @@ declare interface Storage_2 {
1744
2600
  */
1745
2601
  removeItem(key: string): void;
1746
2602
  }
1747
- export { Storage_2 as Storage }
1748
2603
 
1749
2604
  declare const successFnsKey: unique symbol;
1750
2605
 
@@ -1776,7 +2631,7 @@ export declare const toTypeString: (value: unknown) => string;
1776
2631
  /**
1777
2632
  * 过渡属性
1778
2633
  */
1779
- export declare type TransitionProp = {
2634
+ declare type TransitionProp = {
1780
2635
  (route: Route, index: number): CustomTransition | boolean;
1781
2636
  } | CustomTransition | boolean;
1782
2637
 
@@ -1825,7 +2680,7 @@ declare class TreeImpl extends TreeNodeImpl implements Tree {
1825
2680
  /**
1826
2681
  * 默认构造函数
1827
2682
  */
1828
- constructor(options?: TreeOptions, defaultState?: Record<string, any>);
2683
+ constructor(options?: PersistOptions, defaultState?: Record<string, any>);
1829
2684
  /**
1830
2685
  * 加入数据
1831
2686
  * @param args
@@ -1897,15 +2752,6 @@ declare class TreeNodeImpl implements TreeNode {
1897
2752
  constructor(id: string);
1898
2753
  }
1899
2754
 
1900
- /**
1901
- * Tree参数
1902
- */
1903
- declare type TreeOptions = {
1904
- name?: string;
1905
- persistPolicy?: PersistPolicy;
1906
- storage?: Storage_2;
1907
- };
1908
-
1909
2755
  /**
1910
2756
  * 判断类型
1911
2757
  * @param obj
@@ -1933,37 +2779,38 @@ declare enum UpdateType {
1933
2779
 
1934
2780
  /**
1935
2781
  * Returns the global bus
1936
- * @param proxy
2782
+ * @param contextRelationKey 上下文关联key
1937
2783
  * @returns
1938
2784
  */
1939
- export declare function useBus(proxy?: Proxy_2): BusInterface;
2785
+ export declare function useBus(contextRelationKey?: FoxContextRelationKey): BusInterface | null;
1940
2786
 
1941
2787
  /**
1942
2788
  * Returns the global event proxy
1943
- * @param proxy
1944
2789
  * @returns
1945
2790
  */
1946
- export declare function useEventProxy(proxy?: Proxy_2): EventProxy;
2791
+ export declare function useEventProxy(contextRelationKey?: FoxContextRelationKey): EventProxy | null;
1947
2792
 
1948
2793
  /**
1949
2794
  * Returns the current fox
1950
- * @param proxy
2795
+ * @param contextRelationKey 上下文关联key
2796
+ *
1951
2797
  * @returns
1952
2798
  */
1953
- export declare function useFox(proxy?: Proxy_2): Fox;
2799
+ export declare function useFox(contextRelationKey?: FoxContextRelationKey): Fox | null;
1954
2800
 
1955
2801
  /**
1956
2802
  * Returns the current route
1957
- * @param proxy
2803
+ * @param 上下文关联key
1958
2804
  * @returns
1959
2805
  */
1960
- export declare function useRoute(proxy?: Proxy_2): Route | null;
2806
+ export declare function useRoute(contextRelationKey?: FoxContextRelationKey): Route | null;
1961
2807
 
1962
2808
  /**
1963
2809
  * Returns the current router
2810
+ * @param 上下文关联key
1964
2811
  * @returns
1965
2812
  */
1966
- export declare function useRouter(proxy?: Proxy_2): Router;
2813
+ export declare function useRouter(contextRelationKey?: FoxContextRelationKey): Router | null;
1967
2814
 
1968
2815
  declare const valueKey: unique symbol;
1969
2816
 
@@ -2043,4 +2890,14 @@ declare class ViewPlace {
2043
2890
  static include(list: ViewPlace[], viewPlace: ViewPlace): boolean;
2044
2891
  }
2045
2892
 
2893
+ /**
2894
+ * 在绑定LifecycleContext上下文中中执行函数
2895
+ *
2896
+ * currentScope(effectScope)为空的情况的替代方案
2897
+ * @param ctx
2898
+ * @param fn
2899
+ * @returns
2900
+ */
2901
+ export declare function withLifecycleContext<T>(ctx: LifecycleContext, fn: () => Promise<T> | T): Promise<T>;
2902
+
2046
2903
  export { }