@fox-js/fox 3.1.1-2 → 3.1.1-20
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.
- package/libs/index.cjs.js +1 -3
- package/libs/index.esm.d.ts +938 -75
- package/libs/index.esm.js +3107 -2974
- package/libs/index.umd.js +1 -3
- package/package.json +3 -4
package/libs/index.esm.d.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import { ComponentInternalInstance } from 'vue';
|
|
3
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
4
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
5
|
import { ComponentPublicInstance } from 'vue';
|
|
6
|
+
import { DefineComponent } from 'vue';
|
|
7
|
+
import { ExtractPropTypes } from 'vue';
|
|
8
|
+
import { HistoryUpdatePolicy } from './operationType';
|
|
4
9
|
import { InjectionKey } from 'vue';
|
|
10
|
+
import { PropType } from 'vue';
|
|
11
|
+
import { PublicProps } from 'vue';
|
|
5
12
|
import { Ref } from 'vue';
|
|
6
|
-
import {
|
|
13
|
+
import { RendererElement } from 'vue';
|
|
14
|
+
import { RendererNode } from 'vue';
|
|
15
|
+
import { VNode } from 'vue';
|
|
7
16
|
|
|
8
17
|
declare const _addRouteRecorder: unique symbol;
|
|
9
18
|
|
|
@@ -15,7 +24,7 @@ declare const afterFiltersKey: unique symbol;
|
|
|
15
24
|
* after route update filter
|
|
16
25
|
*/
|
|
17
26
|
declare interface AfterRouteFilter {
|
|
18
|
-
(to: Route, from: Route, session: Record<string | number | symbol, any>): void;
|
|
27
|
+
(to: Route, from: Route | null, session: Record<string | number | symbol, any>): void;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
declare const argsKey: unique symbol;
|
|
@@ -35,7 +44,7 @@ declare interface BeforeResotreFilter {
|
|
|
35
44
|
* before route update filter
|
|
36
45
|
*/
|
|
37
46
|
declare interface BeforeRouteFilter {
|
|
38
|
-
(to: Route, from: Route, next: {
|
|
47
|
+
(to: Route, from: Route | null, next: {
|
|
39
48
|
(pass?: boolean | Route): void;
|
|
40
49
|
}, session: Record<string | number | symbol, any>): void;
|
|
41
50
|
}
|
|
@@ -45,7 +54,7 @@ declare const _buildPage: unique symbol;
|
|
|
45
54
|
/**
|
|
46
55
|
* 导出Bus
|
|
47
56
|
*/
|
|
48
|
-
export declare const Bus:
|
|
57
|
+
export declare const Bus: typeof TreeImpl;
|
|
49
58
|
|
|
50
59
|
/**
|
|
51
60
|
* Bus Interface
|
|
@@ -119,7 +128,7 @@ export declare function createWebHashHistory(navigateFirstRoute?: boolean, query
|
|
|
119
128
|
*/
|
|
120
129
|
export declare function createWebHistory(navigateFirstRoute?: boolean, base?: string | null, query?: string, historyMonitor?: boolean | IfFunction, traceless?: boolean | IfFunction, storage?: Storage_2): RouterHistory;
|
|
121
130
|
|
|
122
|
-
declare const
|
|
131
|
+
declare const currentRoute: unique symbol;
|
|
123
132
|
|
|
124
133
|
declare const currentRoutes: unique symbol;
|
|
125
134
|
|
|
@@ -338,7 +347,7 @@ export declare class EventProxy {
|
|
|
338
347
|
* @param callback
|
|
339
348
|
* @returns
|
|
340
349
|
*/
|
|
341
|
-
off(key: string, callback
|
|
350
|
+
off(key: string, callback?: Callback): EventProxy;
|
|
342
351
|
/**
|
|
343
352
|
* 绑定事件
|
|
344
353
|
* @param key
|
|
@@ -353,7 +362,7 @@ export declare class EventProxy {
|
|
|
353
362
|
* @param callback
|
|
354
363
|
* @returns
|
|
355
364
|
*/
|
|
356
|
-
unbind(key: string, callback
|
|
365
|
+
unbind(key: string, callback?: Callback): EventProxy;
|
|
357
366
|
/**
|
|
358
367
|
* 绑定一次性触发函数
|
|
359
368
|
* @param key
|
|
@@ -448,7 +457,7 @@ export declare interface Fox {
|
|
|
448
457
|
* 安装
|
|
449
458
|
* @param app
|
|
450
459
|
*/
|
|
451
|
-
install(app: App): void;
|
|
460
|
+
install(app: App<Element>): void;
|
|
452
461
|
}
|
|
453
462
|
|
|
454
463
|
/**
|
|
@@ -464,7 +473,7 @@ export declare const FoxBeforeLeave = "FoxLeave";
|
|
|
464
473
|
/**
|
|
465
474
|
* 全局Bus
|
|
466
475
|
*/
|
|
467
|
-
export declare const foxBusKey: FoxInjectionKey<
|
|
476
|
+
export declare const foxBusKey: FoxInjectionKey<BusInterface>;
|
|
468
477
|
|
|
469
478
|
/**
|
|
470
479
|
* Fox过渡进入事件
|
|
@@ -476,8 +485,7 @@ export declare const FoxEnter = "FoxEnter";
|
|
|
476
485
|
*/
|
|
477
486
|
export declare const foxEventProxyKey: FoxInjectionKey<EventProxy>;
|
|
478
487
|
|
|
479
|
-
declare
|
|
480
|
-
}
|
|
488
|
+
declare type FoxInjectionKey<T> = InjectionKey<T>;
|
|
481
489
|
|
|
482
490
|
/**
|
|
483
491
|
* 全局Fox
|
|
@@ -532,7 +540,7 @@ declare const historyKey: unique symbol;
|
|
|
532
540
|
/**
|
|
533
541
|
* 历史更新策略
|
|
534
542
|
*/
|
|
535
|
-
declare type
|
|
543
|
+
declare type HistoryUpdatePolicy_2 = 'push' | 'replace' | 'traceless';
|
|
536
544
|
|
|
537
545
|
declare const idKey: unique symbol;
|
|
538
546
|
|
|
@@ -598,10 +606,12 @@ export declare const isMap: (val: unknown) => val is Map<any, any>;
|
|
|
598
606
|
* @param val
|
|
599
607
|
* @returns
|
|
600
608
|
*/
|
|
601
|
-
export declare const isNil: (val: unknown) => val is null;
|
|
609
|
+
export declare const isNil: (val: unknown) => val is null | undefined;
|
|
602
610
|
|
|
603
611
|
/**
|
|
604
612
|
* 是否为object
|
|
613
|
+
* @param val
|
|
614
|
+
* @returns
|
|
605
615
|
*/
|
|
606
616
|
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
|
607
617
|
|
|
@@ -689,10 +699,6 @@ declare class Model {
|
|
|
689
699
|
props: Record<string | number | symbol, any> | boolean | {
|
|
690
700
|
(route: Route): any;
|
|
691
701
|
} | undefined;
|
|
692
|
-
/**
|
|
693
|
-
* 元数据
|
|
694
|
-
*/
|
|
695
|
-
meta?: Record<string | number | symbol, any>;
|
|
696
702
|
/**
|
|
697
703
|
* 原始组件数据
|
|
698
704
|
*/
|
|
@@ -707,11 +713,10 @@ declare class Model {
|
|
|
707
713
|
* @param name
|
|
708
714
|
* @param src
|
|
709
715
|
* @param props
|
|
710
|
-
* @param meta
|
|
711
716
|
*/
|
|
712
717
|
constructor(name: string, src: any, props?: Record<string | number | symbol, any> | {
|
|
713
718
|
(route: Route): any;
|
|
714
|
-
} | boolean
|
|
719
|
+
} | boolean);
|
|
715
720
|
/**
|
|
716
721
|
* 是否已经解析完成
|
|
717
722
|
*/
|
|
@@ -768,6 +773,8 @@ declare class ModelSlot {
|
|
|
768
773
|
|
|
769
774
|
declare const nameKey: unique symbol;
|
|
770
775
|
|
|
776
|
+
declare const normalizeRoute: unique symbol;
|
|
777
|
+
|
|
771
778
|
declare const notFoundKey: unique symbol;
|
|
772
779
|
|
|
773
780
|
declare const notFoundPathKey: unique symbol;
|
|
@@ -833,6 +840,20 @@ declare const parentNodeKey: unique symbol;
|
|
|
833
840
|
|
|
834
841
|
declare const persistentModeKey: unique symbol;
|
|
835
842
|
|
|
843
|
+
/**
|
|
844
|
+
* 持久化参数
|
|
845
|
+
*/
|
|
846
|
+
declare type PersistOptions = {
|
|
847
|
+
name?: string;
|
|
848
|
+
persistPolicy?: PersistPolicy;
|
|
849
|
+
storage?: Storage_2;
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* 持久化策略
|
|
854
|
+
*/
|
|
855
|
+
declare type PersistPolicy = 'memory' | 'session' | 'local' | 'custom';
|
|
856
|
+
|
|
836
857
|
/**
|
|
837
858
|
* 属性函数
|
|
838
859
|
*/
|
|
@@ -859,6 +880,22 @@ export declare function provideContextValue(proxy: ComponentPublicInstance, key:
|
|
|
859
880
|
|
|
860
881
|
declare type Proxy_2 = ComponentPublicInstance | null;
|
|
861
882
|
|
|
883
|
+
/**
|
|
884
|
+
* raw state
|
|
885
|
+
* @param state
|
|
886
|
+
* @param options
|
|
887
|
+
* @returns
|
|
888
|
+
*/
|
|
889
|
+
export declare function rawState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* reactive state
|
|
893
|
+
* @param state
|
|
894
|
+
* @param options
|
|
895
|
+
* @returns
|
|
896
|
+
*/
|
|
897
|
+
export declare function reactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
898
|
+
|
|
862
899
|
declare const readyHandlersKey: unique symbol;
|
|
863
900
|
|
|
864
901
|
declare const readyKey: unique symbol;
|
|
@@ -867,13 +904,169 @@ declare const registerKey: unique symbol;
|
|
|
867
904
|
|
|
868
905
|
declare const registerKey_2: unique symbol;
|
|
869
906
|
|
|
907
|
+
/**
|
|
908
|
+
* remove route 条件
|
|
909
|
+
*/
|
|
910
|
+
declare interface RemoveRouteCondition {
|
|
911
|
+
all?: boolean;
|
|
912
|
+
until?: string;
|
|
913
|
+
to?: string;
|
|
914
|
+
root?: string;
|
|
915
|
+
}
|
|
916
|
+
|
|
870
917
|
declare const _removeRouteRecorder: unique symbol;
|
|
871
918
|
|
|
872
919
|
declare const _removeView: unique symbol;
|
|
873
920
|
|
|
874
|
-
|
|
921
|
+
/**
|
|
922
|
+
* AMD加载器
|
|
923
|
+
*/
|
|
924
|
+
declare class Require {
|
|
925
|
+
/**
|
|
926
|
+
* module manager
|
|
927
|
+
*/
|
|
928
|
+
private moduleManager;
|
|
929
|
+
/**
|
|
930
|
+
* 参数配置
|
|
931
|
+
*/
|
|
932
|
+
private options;
|
|
933
|
+
/**
|
|
934
|
+
* 设置路径映射
|
|
935
|
+
*/
|
|
936
|
+
set paths(paths: Record<string, string>);
|
|
937
|
+
/**
|
|
938
|
+
* 获取路径映射
|
|
939
|
+
*/
|
|
940
|
+
get paths(): Record<string, string>;
|
|
941
|
+
/**
|
|
942
|
+
* 设置路径别名
|
|
943
|
+
*/
|
|
944
|
+
set alias(alias: Record<string, string>);
|
|
945
|
+
/**
|
|
946
|
+
* 获取路径别名
|
|
947
|
+
*/
|
|
948
|
+
get alias(): Record<string, string>;
|
|
949
|
+
/**
|
|
950
|
+
* 设置不需要解析路径或判断函数
|
|
951
|
+
*/
|
|
952
|
+
set naturePaths(nature: string[] | {
|
|
953
|
+
(path: string): boolean;
|
|
954
|
+
});
|
|
955
|
+
/**
|
|
956
|
+
* 获取不需要解析路径或判断函数
|
|
957
|
+
*/
|
|
958
|
+
get naturePaths(): string[] | {
|
|
959
|
+
(path: string): boolean;
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* 设置超时时间
|
|
963
|
+
*/
|
|
964
|
+
set timeout(t: number);
|
|
965
|
+
/**
|
|
966
|
+
* 获取超时时间
|
|
967
|
+
*/
|
|
968
|
+
get timeout(): number;
|
|
969
|
+
/**
|
|
970
|
+
* 设置query
|
|
971
|
+
*/
|
|
972
|
+
private _query?;
|
|
973
|
+
set query(val: Record<string, string | number> | undefined);
|
|
974
|
+
get query(): Record<string, string | number> | undefined;
|
|
975
|
+
/**
|
|
976
|
+
* 获取document head
|
|
977
|
+
*/
|
|
978
|
+
get head(): any;
|
|
979
|
+
/**
|
|
980
|
+
* 构造函数
|
|
981
|
+
*/
|
|
982
|
+
constructor();
|
|
983
|
+
/**
|
|
984
|
+
* 安装module
|
|
985
|
+
*/
|
|
986
|
+
setModule(id: string, exports: Record<string, any> | {
|
|
987
|
+
(): Record<string, any>;
|
|
988
|
+
}): void;
|
|
989
|
+
/**
|
|
990
|
+
* 移除module
|
|
991
|
+
*/
|
|
992
|
+
removeModule(id: string): void;
|
|
993
|
+
/**
|
|
994
|
+
* 加载
|
|
995
|
+
* @params args
|
|
996
|
+
*/
|
|
997
|
+
ensure(...args: any[]): Require;
|
|
998
|
+
/**
|
|
999
|
+
* 卸载
|
|
1000
|
+
*/
|
|
1001
|
+
remove(...args: any): Require;
|
|
1002
|
+
/**
|
|
1003
|
+
* 加载
|
|
1004
|
+
*
|
|
1005
|
+
* @param chain
|
|
1006
|
+
* @param taskNode
|
|
1007
|
+
*/
|
|
1008
|
+
private mount;
|
|
1009
|
+
/**
|
|
1010
|
+
* 加载css
|
|
1011
|
+
* @param chain
|
|
1012
|
+
* @param task
|
|
1013
|
+
* @param point
|
|
1014
|
+
*/
|
|
1015
|
+
private mountCSS;
|
|
1016
|
+
/**
|
|
1017
|
+
* 加载js
|
|
1018
|
+
*
|
|
1019
|
+
* @param chain
|
|
1020
|
+
* @param task
|
|
1021
|
+
* @param point
|
|
1022
|
+
*/
|
|
1023
|
+
private mountJS;
|
|
1024
|
+
/**
|
|
1025
|
+
* 卸载资源
|
|
1026
|
+
*/
|
|
1027
|
+
private unmount;
|
|
1028
|
+
/**
|
|
1029
|
+
* 去掉空元素
|
|
1030
|
+
*/
|
|
1031
|
+
private trimEmptyElement;
|
|
1032
|
+
/**
|
|
1033
|
+
* 创建define函数
|
|
1034
|
+
* @param module
|
|
1035
|
+
* @param task
|
|
1036
|
+
* @returns
|
|
1037
|
+
*/
|
|
1038
|
+
private createDefine;
|
|
1039
|
+
/**
|
|
1040
|
+
* 解析路径
|
|
1041
|
+
* @param uri
|
|
1042
|
+
* @returns
|
|
1043
|
+
*/
|
|
1044
|
+
private resolvePath;
|
|
1045
|
+
/**
|
|
1046
|
+
* 创建search字符串
|
|
1047
|
+
*/
|
|
1048
|
+
private createSearch;
|
|
1049
|
+
/**
|
|
1050
|
+
* 获取文件名后缀
|
|
1051
|
+
* @param name
|
|
1052
|
+
* @returns {string}
|
|
1053
|
+
*/
|
|
1054
|
+
private getFileNamePostfix;
|
|
1055
|
+
/**
|
|
1056
|
+
* 是否为不处理的路径
|
|
1057
|
+
* @param uri
|
|
1058
|
+
* @return
|
|
1059
|
+
*/
|
|
1060
|
+
private isNaturePath;
|
|
1061
|
+
/**
|
|
1062
|
+
* 解析路径
|
|
1063
|
+
* @param uri
|
|
1064
|
+
* @param replace
|
|
1065
|
+
*/
|
|
1066
|
+
private parserPath;
|
|
1067
|
+
}
|
|
875
1068
|
|
|
876
|
-
declare const
|
|
1069
|
+
declare const _resolveComponent: unique symbol;
|
|
877
1070
|
|
|
878
1071
|
declare const rootKey: unique symbol;
|
|
879
1072
|
|
|
@@ -922,9 +1115,7 @@ export declare class Route {
|
|
|
922
1115
|
/**
|
|
923
1116
|
* 获取匹配的元数组列表
|
|
924
1117
|
*/
|
|
925
|
-
matched?:
|
|
926
|
-
meta: Record<string | number | symbol, any>;
|
|
927
|
-
}[];
|
|
1118
|
+
matched?: Array<Route>;
|
|
928
1119
|
/**
|
|
929
1120
|
* route本身的元数据
|
|
930
1121
|
*/
|
|
@@ -958,7 +1149,7 @@ export declare class Route {
|
|
|
958
1149
|
/**
|
|
959
1150
|
* 历史更新策略
|
|
960
1151
|
*/
|
|
961
|
-
historyUpdatePolicy?:
|
|
1152
|
+
historyUpdatePolicy?: HistoryUpdatePolicy_2;
|
|
962
1153
|
/**
|
|
963
1154
|
* view属性集合(用于multi view的tab view属性)
|
|
964
1155
|
*/
|
|
@@ -975,10 +1166,6 @@ export declare class Route {
|
|
|
975
1166
|
* 插槽(用于历史还原)
|
|
976
1167
|
*/
|
|
977
1168
|
slot?: Slot;
|
|
978
|
-
/**
|
|
979
|
-
* session(router执行链路session)
|
|
980
|
-
*/
|
|
981
|
-
session?: Session;
|
|
982
1169
|
/**
|
|
983
1170
|
* 克隆
|
|
984
1171
|
* @param target
|
|
@@ -993,12 +1180,13 @@ export declare class Route {
|
|
|
993
1180
|
*/
|
|
994
1181
|
static isSame(x: Route, y: Route): boolean;
|
|
995
1182
|
/**
|
|
996
|
-
*
|
|
1183
|
+
* 判断路由路径是一致
|
|
1184
|
+
* route.name 一致 or route.path一致
|
|
997
1185
|
* @param x
|
|
998
1186
|
* @param y
|
|
999
1187
|
* @returns
|
|
1000
1188
|
*/
|
|
1001
|
-
static
|
|
1189
|
+
static isSamePathForRoute(x: Route, y: Route): boolean;
|
|
1002
1190
|
/**
|
|
1003
1191
|
* 由对象生成路由
|
|
1004
1192
|
* @param obj
|
|
@@ -1069,6 +1257,14 @@ declare class RouteModel {
|
|
|
1069
1257
|
* 名称
|
|
1070
1258
|
*/
|
|
1071
1259
|
name?: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* 元数据
|
|
1262
|
+
*/
|
|
1263
|
+
meta?: Record<string | number | symbol, any>;
|
|
1264
|
+
/**
|
|
1265
|
+
* matched routes 当前路由及其所有父路由的匹配记录
|
|
1266
|
+
*/
|
|
1267
|
+
matchedRoutes?: Array<Route>;
|
|
1072
1268
|
/**
|
|
1073
1269
|
* layer集合
|
|
1074
1270
|
*/
|
|
@@ -1108,6 +1304,14 @@ export declare class Router {
|
|
|
1108
1304
|
* 当前路由集合
|
|
1109
1305
|
*/
|
|
1110
1306
|
private [currentRoutes];
|
|
1307
|
+
/**
|
|
1308
|
+
* 当前路由
|
|
1309
|
+
*/
|
|
1310
|
+
private [currentRoute];
|
|
1311
|
+
/**
|
|
1312
|
+
* route sessin key
|
|
1313
|
+
*/
|
|
1314
|
+
private [routeSessionCacheKey];
|
|
1111
1315
|
/**
|
|
1112
1316
|
* 错误回调
|
|
1113
1317
|
*/
|
|
@@ -1144,14 +1348,174 @@ export declare class Router {
|
|
|
1144
1348
|
* 是否初始化
|
|
1145
1349
|
*/
|
|
1146
1350
|
private [initKey];
|
|
1147
|
-
/**
|
|
1148
|
-
* 当前最新路由
|
|
1149
|
-
*/
|
|
1150
|
-
private [currentKey];
|
|
1151
1351
|
/**
|
|
1152
1352
|
* 获取当前最新route
|
|
1153
1353
|
*/
|
|
1154
|
-
get
|
|
1354
|
+
get currentRoute(): Readonly<Ref< {
|
|
1355
|
+
readonly path?: string | undefined;
|
|
1356
|
+
readonly fullPath?: string | undefined;
|
|
1357
|
+
readonly alias?: string | undefined;
|
|
1358
|
+
readonly name?: string | undefined;
|
|
1359
|
+
readonly root?: string | undefined;
|
|
1360
|
+
readonly params?: {
|
|
1361
|
+
readonly [x: string]: any;
|
|
1362
|
+
readonly [x: number]: any;
|
|
1363
|
+
readonly [x: symbol]: any;
|
|
1364
|
+
} | undefined;
|
|
1365
|
+
readonly query?: any;
|
|
1366
|
+
readonly traceless?: boolean | undefined;
|
|
1367
|
+
readonly template?: string | undefined;
|
|
1368
|
+
readonly matched?: readonly {
|
|
1369
|
+
readonly path?: string | undefined;
|
|
1370
|
+
readonly fullPath: string;
|
|
1371
|
+
readonly alias?: string | undefined;
|
|
1372
|
+
readonly name?: string | undefined;
|
|
1373
|
+
readonly root?: string | undefined;
|
|
1374
|
+
readonly params?: {
|
|
1375
|
+
readonly [x: string]: any;
|
|
1376
|
+
readonly [x: number]: any;
|
|
1377
|
+
readonly [x: symbol]: any;
|
|
1378
|
+
} | undefined;
|
|
1379
|
+
readonly query?: any;
|
|
1380
|
+
readonly traceless?: boolean | undefined;
|
|
1381
|
+
readonly template?: string | undefined;
|
|
1382
|
+
readonly matched?: readonly /*elided*/ any[] | undefined;
|
|
1383
|
+
readonly meta?: {
|
|
1384
|
+
readonly [x: string]: any;
|
|
1385
|
+
readonly [x: number]: any;
|
|
1386
|
+
readonly [x: symbol]: any;
|
|
1387
|
+
} | undefined;
|
|
1388
|
+
readonly success?: {
|
|
1389
|
+
(...arg: any[]): void;
|
|
1390
|
+
} | undefined;
|
|
1391
|
+
readonly error?: {
|
|
1392
|
+
(...arg: any[]): void;
|
|
1393
|
+
} | undefined;
|
|
1394
|
+
readonly destroy?: {
|
|
1395
|
+
(...arg: any[]): void;
|
|
1396
|
+
} | undefined;
|
|
1397
|
+
readonly opsType?: OperationType | undefined;
|
|
1398
|
+
readonly updateType?: UpdateType | undefined;
|
|
1399
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1400
|
+
readonly viewTagAttrs?: any;
|
|
1401
|
+
readonly index?: number | undefined;
|
|
1402
|
+
readonly active?: boolean | undefined;
|
|
1403
|
+
readonly slot?: {
|
|
1404
|
+
readonly name: string;
|
|
1405
|
+
readonly level: number;
|
|
1406
|
+
readonly rootName: string | undefined;
|
|
1407
|
+
readonly rootIndex: number;
|
|
1408
|
+
} | undefined;
|
|
1409
|
+
}[] | undefined;
|
|
1410
|
+
readonly meta?: {
|
|
1411
|
+
readonly [x: string]: any;
|
|
1412
|
+
readonly [x: number]: any;
|
|
1413
|
+
readonly [x: symbol]: any;
|
|
1414
|
+
} | undefined;
|
|
1415
|
+
readonly success?: {
|
|
1416
|
+
(...arg: any[]): void;
|
|
1417
|
+
} | undefined;
|
|
1418
|
+
readonly error?: {
|
|
1419
|
+
(...arg: any[]): void;
|
|
1420
|
+
} | undefined;
|
|
1421
|
+
readonly destroy?: {
|
|
1422
|
+
(...arg: any[]): void;
|
|
1423
|
+
} | undefined;
|
|
1424
|
+
readonly opsType?: OperationType | undefined;
|
|
1425
|
+
readonly updateType?: UpdateType | undefined;
|
|
1426
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1427
|
+
readonly viewTagAttrs?: any;
|
|
1428
|
+
readonly index?: number | undefined;
|
|
1429
|
+
readonly active?: boolean | undefined;
|
|
1430
|
+
readonly slot?: {
|
|
1431
|
+
readonly name: string;
|
|
1432
|
+
readonly level: number;
|
|
1433
|
+
readonly rootName: string | undefined;
|
|
1434
|
+
readonly rootIndex: number;
|
|
1435
|
+
} | undefined;
|
|
1436
|
+
} | null, {
|
|
1437
|
+
readonly path?: string | undefined;
|
|
1438
|
+
readonly fullPath?: string | undefined;
|
|
1439
|
+
readonly alias?: string | undefined;
|
|
1440
|
+
readonly name?: string | undefined;
|
|
1441
|
+
readonly root?: string | undefined;
|
|
1442
|
+
readonly params?: {
|
|
1443
|
+
readonly [x: string]: any;
|
|
1444
|
+
readonly [x: number]: any;
|
|
1445
|
+
readonly [x: symbol]: any;
|
|
1446
|
+
} | undefined;
|
|
1447
|
+
readonly query?: any;
|
|
1448
|
+
readonly traceless?: boolean | undefined;
|
|
1449
|
+
readonly template?: string | undefined;
|
|
1450
|
+
readonly matched?: readonly {
|
|
1451
|
+
readonly path?: string | undefined;
|
|
1452
|
+
readonly fullPath: string;
|
|
1453
|
+
readonly alias?: string | undefined;
|
|
1454
|
+
readonly name?: string | undefined;
|
|
1455
|
+
readonly root?: string | undefined;
|
|
1456
|
+
readonly params?: {
|
|
1457
|
+
readonly [x: string]: any;
|
|
1458
|
+
readonly [x: number]: any;
|
|
1459
|
+
readonly [x: symbol]: any;
|
|
1460
|
+
} | undefined;
|
|
1461
|
+
readonly query?: any;
|
|
1462
|
+
readonly traceless?: boolean | undefined;
|
|
1463
|
+
readonly template?: string | undefined;
|
|
1464
|
+
readonly matched?: readonly /*elided*/ any[] | undefined;
|
|
1465
|
+
readonly meta?: {
|
|
1466
|
+
readonly [x: string]: any;
|
|
1467
|
+
readonly [x: number]: any;
|
|
1468
|
+
readonly [x: symbol]: any;
|
|
1469
|
+
} | undefined;
|
|
1470
|
+
readonly success?: {
|
|
1471
|
+
(...arg: any[]): void;
|
|
1472
|
+
} | undefined;
|
|
1473
|
+
readonly error?: {
|
|
1474
|
+
(...arg: any[]): void;
|
|
1475
|
+
} | undefined;
|
|
1476
|
+
readonly destroy?: {
|
|
1477
|
+
(...arg: any[]): void;
|
|
1478
|
+
} | undefined;
|
|
1479
|
+
readonly opsType?: OperationType | undefined;
|
|
1480
|
+
readonly updateType?: UpdateType | undefined;
|
|
1481
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1482
|
+
readonly viewTagAttrs?: any;
|
|
1483
|
+
readonly index?: number | undefined;
|
|
1484
|
+
readonly active?: boolean | undefined;
|
|
1485
|
+
readonly slot?: {
|
|
1486
|
+
readonly name: string;
|
|
1487
|
+
readonly level: number;
|
|
1488
|
+
readonly rootName: string | undefined;
|
|
1489
|
+
readonly rootIndex: number;
|
|
1490
|
+
} | undefined;
|
|
1491
|
+
}[] | undefined;
|
|
1492
|
+
readonly meta?: {
|
|
1493
|
+
readonly [x: string]: any;
|
|
1494
|
+
readonly [x: number]: any;
|
|
1495
|
+
readonly [x: symbol]: any;
|
|
1496
|
+
} | undefined;
|
|
1497
|
+
readonly success?: {
|
|
1498
|
+
(...arg: any[]): void;
|
|
1499
|
+
} | undefined;
|
|
1500
|
+
readonly error?: {
|
|
1501
|
+
(...arg: any[]): void;
|
|
1502
|
+
} | undefined;
|
|
1503
|
+
readonly destroy?: {
|
|
1504
|
+
(...arg: any[]): void;
|
|
1505
|
+
} | undefined;
|
|
1506
|
+
readonly opsType?: OperationType | undefined;
|
|
1507
|
+
readonly updateType?: UpdateType | undefined;
|
|
1508
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1509
|
+
readonly viewTagAttrs?: any;
|
|
1510
|
+
readonly index?: number | undefined;
|
|
1511
|
+
readonly active?: boolean | undefined;
|
|
1512
|
+
readonly slot?: {
|
|
1513
|
+
readonly name: string;
|
|
1514
|
+
readonly level: number;
|
|
1515
|
+
readonly rootName: string | undefined;
|
|
1516
|
+
readonly rootIndex: number;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
} | null>>;
|
|
1155
1519
|
private options;
|
|
1156
1520
|
/**
|
|
1157
1521
|
* 构造函数
|
|
@@ -1337,11 +1701,11 @@ export declare class Router {
|
|
|
1337
1701
|
*/
|
|
1338
1702
|
private [_findRouteModel];
|
|
1339
1703
|
/**
|
|
1340
|
-
*
|
|
1704
|
+
* 解析并格式化路由
|
|
1341
1705
|
* @param args
|
|
1342
1706
|
* @returns
|
|
1343
1707
|
*/
|
|
1344
|
-
[
|
|
1708
|
+
[normalizeRoute](args: any): Route | null;
|
|
1345
1709
|
/**
|
|
1346
1710
|
* 路由跳转(operation类型为Push)
|
|
1347
1711
|
* @param args
|
|
@@ -1367,7 +1731,7 @@ export declare class Router {
|
|
|
1367
1731
|
* @param term
|
|
1368
1732
|
* @param changeHistory
|
|
1369
1733
|
*/
|
|
1370
|
-
remove(term?:
|
|
1734
|
+
remove(term?: RemoveRouteCondition, changeHistory?: boolean): Promise<boolean>;
|
|
1371
1735
|
/**
|
|
1372
1736
|
* 路由跳转(operation类型为Open)
|
|
1373
1737
|
* @param args
|
|
@@ -1574,6 +1938,82 @@ declare interface RouterHistory {
|
|
|
1574
1938
|
setRestorePoint(routes?: Array<Route>): void;
|
|
1575
1939
|
}
|
|
1576
1940
|
|
|
1941
|
+
/**
|
|
1942
|
+
* router link
|
|
1943
|
+
*/
|
|
1944
|
+
export declare let RouterLink: DefineComponent<ExtractPropTypes< {
|
|
1945
|
+
tag: {
|
|
1946
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1947
|
+
required: false;
|
|
1948
|
+
default: string;
|
|
1949
|
+
};
|
|
1950
|
+
to: {
|
|
1951
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1952
|
+
required: true;
|
|
1953
|
+
};
|
|
1954
|
+
root: {
|
|
1955
|
+
type: PropType<string>;
|
|
1956
|
+
};
|
|
1957
|
+
activeClass: {
|
|
1958
|
+
type: PropType<string | GenericFunction>;
|
|
1959
|
+
required: false;
|
|
1960
|
+
default: string;
|
|
1961
|
+
};
|
|
1962
|
+
exact: {
|
|
1963
|
+
type: PropType<string | boolean | GenericFunction>;
|
|
1964
|
+
required: false;
|
|
1965
|
+
};
|
|
1966
|
+
exactActiveClass: {
|
|
1967
|
+
type: PropType<string | GenericFunction>;
|
|
1968
|
+
required: false;
|
|
1969
|
+
default: string;
|
|
1970
|
+
};
|
|
1971
|
+
event: {
|
|
1972
|
+
type: PropType<string | GenericFunction>;
|
|
1973
|
+
required: false;
|
|
1974
|
+
default: string;
|
|
1975
|
+
};
|
|
1976
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
1977
|
+
[key: string]: any;
|
|
1978
|
+
}> | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1979
|
+
tag: {
|
|
1980
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1981
|
+
required: false;
|
|
1982
|
+
default: string;
|
|
1983
|
+
};
|
|
1984
|
+
to: {
|
|
1985
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1986
|
+
required: true;
|
|
1987
|
+
};
|
|
1988
|
+
root: {
|
|
1989
|
+
type: PropType<string>;
|
|
1990
|
+
};
|
|
1991
|
+
activeClass: {
|
|
1992
|
+
type: PropType<string | GenericFunction>;
|
|
1993
|
+
required: false;
|
|
1994
|
+
default: string;
|
|
1995
|
+
};
|
|
1996
|
+
exact: {
|
|
1997
|
+
type: PropType<string | boolean | GenericFunction>;
|
|
1998
|
+
required: false;
|
|
1999
|
+
};
|
|
2000
|
+
exactActiveClass: {
|
|
2001
|
+
type: PropType<string | GenericFunction>;
|
|
2002
|
+
required: false;
|
|
2003
|
+
default: string;
|
|
2004
|
+
};
|
|
2005
|
+
event: {
|
|
2006
|
+
type: PropType<string | GenericFunction>;
|
|
2007
|
+
required: false;
|
|
2008
|
+
default: string;
|
|
2009
|
+
};
|
|
2010
|
+
}>> & Readonly<{}>, {
|
|
2011
|
+
tag: string;
|
|
2012
|
+
activeClass: string | GenericFunction;
|
|
2013
|
+
exactActiveClass: string | GenericFunction;
|
|
2014
|
+
event: string | GenericFunction;
|
|
2015
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2016
|
+
|
|
1577
2017
|
/**
|
|
1578
2018
|
* router options
|
|
1579
2019
|
*/
|
|
@@ -1606,45 +2046,380 @@ export declare interface RouterOptions {
|
|
|
1606
2046
|
notFoundPath?: string;
|
|
1607
2047
|
}
|
|
1608
2048
|
|
|
1609
|
-
|
|
2049
|
+
/**
|
|
2050
|
+
* router view
|
|
2051
|
+
*/
|
|
2052
|
+
export declare const RouterView: DefineComponent<ExtractPropTypes< {
|
|
2053
|
+
name: {
|
|
2054
|
+
type: PropType<string>;
|
|
2055
|
+
required: false;
|
|
2056
|
+
default: string;
|
|
2057
|
+
};
|
|
2058
|
+
modelSlot: {
|
|
2059
|
+
type: PropType<ModelSlot>;
|
|
2060
|
+
required: false;
|
|
2061
|
+
};
|
|
2062
|
+
multi: {
|
|
2063
|
+
type: PropType<boolean>;
|
|
2064
|
+
required: false;
|
|
2065
|
+
default: boolean;
|
|
2066
|
+
};
|
|
2067
|
+
tag: {
|
|
2068
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2069
|
+
required: false;
|
|
2070
|
+
default: string;
|
|
2071
|
+
};
|
|
2072
|
+
viewTag: {
|
|
2073
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2074
|
+
required: false;
|
|
2075
|
+
default: string;
|
|
2076
|
+
};
|
|
2077
|
+
viewTagProps: {
|
|
2078
|
+
type: PropType<unknown | PropFunction>;
|
|
2079
|
+
required: false;
|
|
2080
|
+
default(): {};
|
|
2081
|
+
};
|
|
2082
|
+
viewClass: {
|
|
2083
|
+
type: PropType<string | PropFunction>;
|
|
2084
|
+
required: false;
|
|
2085
|
+
};
|
|
2086
|
+
viewActiveClass: {
|
|
2087
|
+
type: PropType<string | PropFunction>;
|
|
2088
|
+
required: false;
|
|
2089
|
+
};
|
|
2090
|
+
viewInactiveClass: {
|
|
2091
|
+
type: PropType<string | PropFunction>;
|
|
2092
|
+
required: false;
|
|
2093
|
+
};
|
|
2094
|
+
transition: {
|
|
2095
|
+
type: PropType<TransitionProp>;
|
|
2096
|
+
required: false;
|
|
2097
|
+
default: boolean;
|
|
2098
|
+
};
|
|
2099
|
+
transitionName: {
|
|
2100
|
+
type: PropType<string>;
|
|
2101
|
+
required: false;
|
|
2102
|
+
};
|
|
2103
|
+
transitionDuration: {
|
|
2104
|
+
type: PropType<string | number | {
|
|
2105
|
+
enter: number;
|
|
2106
|
+
leave: number;
|
|
2107
|
+
show: number;
|
|
2108
|
+
hide: number;
|
|
2109
|
+
}>;
|
|
2110
|
+
required: false;
|
|
2111
|
+
};
|
|
2112
|
+
enterFromClass: {
|
|
2113
|
+
type: PropType<string>;
|
|
2114
|
+
required: false;
|
|
2115
|
+
};
|
|
2116
|
+
enterActiveClass: {
|
|
2117
|
+
type: PropType<string>;
|
|
2118
|
+
required: false;
|
|
2119
|
+
};
|
|
2120
|
+
enterToClass: {
|
|
2121
|
+
type: PropType<string>;
|
|
2122
|
+
required: false;
|
|
2123
|
+
};
|
|
2124
|
+
leaveFromClass: {
|
|
2125
|
+
type: PropType<string>;
|
|
2126
|
+
required: false;
|
|
2127
|
+
};
|
|
2128
|
+
leaveActiveClass: {
|
|
2129
|
+
type: PropType<string>;
|
|
2130
|
+
required: false;
|
|
2131
|
+
};
|
|
2132
|
+
leaveToClass: {
|
|
2133
|
+
type: PropType<string>;
|
|
2134
|
+
required: false;
|
|
2135
|
+
};
|
|
2136
|
+
showFromClass: {
|
|
2137
|
+
type: PropType<string>;
|
|
2138
|
+
required: false;
|
|
2139
|
+
};
|
|
2140
|
+
showActiveClass: {
|
|
2141
|
+
type: PropType<string>;
|
|
2142
|
+
required: false;
|
|
2143
|
+
};
|
|
2144
|
+
showToClass: {
|
|
2145
|
+
type: PropType<string>;
|
|
2146
|
+
required: false;
|
|
2147
|
+
};
|
|
2148
|
+
hideFromClass: {
|
|
2149
|
+
type: PropType<string>;
|
|
2150
|
+
required: false;
|
|
2151
|
+
};
|
|
2152
|
+
hideActiveClass: {
|
|
2153
|
+
type: PropType<string>;
|
|
2154
|
+
required: false;
|
|
2155
|
+
};
|
|
2156
|
+
hideToClass: {
|
|
2157
|
+
type: PropType<string>;
|
|
2158
|
+
required: false;
|
|
2159
|
+
};
|
|
2160
|
+
beforeEnter: {
|
|
2161
|
+
type: PropType<PropFunction>;
|
|
2162
|
+
required: false;
|
|
2163
|
+
};
|
|
2164
|
+
enter: {
|
|
2165
|
+
type: PropType<PropFunction>;
|
|
2166
|
+
required: false;
|
|
2167
|
+
};
|
|
2168
|
+
afterEnter: {
|
|
2169
|
+
type: PropType<PropFunction>;
|
|
2170
|
+
required: false;
|
|
2171
|
+
};
|
|
2172
|
+
enterCancelled: {
|
|
2173
|
+
type: PropType<PropFunction>;
|
|
2174
|
+
required: false;
|
|
2175
|
+
};
|
|
2176
|
+
beforeLeave: {
|
|
2177
|
+
type: PropType<PropFunction>;
|
|
2178
|
+
required: false;
|
|
2179
|
+
};
|
|
2180
|
+
leave: {
|
|
2181
|
+
type: PropType<PropFunction>;
|
|
2182
|
+
required: false;
|
|
2183
|
+
};
|
|
2184
|
+
afterLeave: {
|
|
2185
|
+
type: PropType<PropFunction>;
|
|
2186
|
+
required: false;
|
|
2187
|
+
};
|
|
2188
|
+
leaveCancelled: {
|
|
2189
|
+
type: PropType<PropFunction>;
|
|
2190
|
+
required: false;
|
|
2191
|
+
};
|
|
2192
|
+
beforeShow: {
|
|
2193
|
+
type: PropType<PropFunction>;
|
|
2194
|
+
required: false;
|
|
2195
|
+
};
|
|
2196
|
+
show: {
|
|
2197
|
+
type: PropType<PropFunction>;
|
|
2198
|
+
required: false;
|
|
2199
|
+
};
|
|
2200
|
+
afterShow: {
|
|
2201
|
+
type: PropType<PropFunction>;
|
|
2202
|
+
required: false;
|
|
2203
|
+
};
|
|
2204
|
+
showCancelled: {
|
|
2205
|
+
type: PropType<PropFunction>;
|
|
2206
|
+
required: false;
|
|
2207
|
+
};
|
|
2208
|
+
beforeHide: {
|
|
2209
|
+
type: PropType<PropFunction>;
|
|
2210
|
+
required: false;
|
|
2211
|
+
};
|
|
2212
|
+
hide: {
|
|
2213
|
+
type: PropType<PropFunction>;
|
|
2214
|
+
required: false;
|
|
2215
|
+
};
|
|
2216
|
+
afterHide: {
|
|
2217
|
+
type: PropType<PropFunction>;
|
|
2218
|
+
required: false;
|
|
2219
|
+
};
|
|
2220
|
+
hideCancelled: {
|
|
2221
|
+
type: PropType<PropFunction>;
|
|
2222
|
+
required: false;
|
|
2223
|
+
};
|
|
2224
|
+
}>, (() => VNode<RendererNode, RendererElement, {
|
|
2225
|
+
[key: string]: any;
|
|
2226
|
+
}> | VNode<RendererNode, RendererElement, {
|
|
2227
|
+
[key: string]: any;
|
|
2228
|
+
}>[] | null) | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2229
|
+
name: {
|
|
2230
|
+
type: PropType<string>;
|
|
2231
|
+
required: false;
|
|
2232
|
+
default: string;
|
|
2233
|
+
};
|
|
2234
|
+
modelSlot: {
|
|
2235
|
+
type: PropType<ModelSlot>;
|
|
2236
|
+
required: false;
|
|
2237
|
+
};
|
|
2238
|
+
multi: {
|
|
2239
|
+
type: PropType<boolean>;
|
|
2240
|
+
required: false;
|
|
2241
|
+
default: boolean;
|
|
2242
|
+
};
|
|
2243
|
+
tag: {
|
|
2244
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2245
|
+
required: false;
|
|
2246
|
+
default: string;
|
|
2247
|
+
};
|
|
2248
|
+
viewTag: {
|
|
2249
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2250
|
+
required: false;
|
|
2251
|
+
default: string;
|
|
2252
|
+
};
|
|
2253
|
+
viewTagProps: {
|
|
2254
|
+
type: PropType<unknown | PropFunction>;
|
|
2255
|
+
required: false;
|
|
2256
|
+
default(): {};
|
|
2257
|
+
};
|
|
2258
|
+
viewClass: {
|
|
2259
|
+
type: PropType<string | PropFunction>;
|
|
2260
|
+
required: false;
|
|
2261
|
+
};
|
|
2262
|
+
viewActiveClass: {
|
|
2263
|
+
type: PropType<string | PropFunction>;
|
|
2264
|
+
required: false;
|
|
2265
|
+
};
|
|
2266
|
+
viewInactiveClass: {
|
|
2267
|
+
type: PropType<string | PropFunction>;
|
|
2268
|
+
required: false;
|
|
2269
|
+
};
|
|
2270
|
+
transition: {
|
|
2271
|
+
type: PropType<TransitionProp>;
|
|
2272
|
+
required: false;
|
|
2273
|
+
default: boolean;
|
|
2274
|
+
};
|
|
2275
|
+
transitionName: {
|
|
2276
|
+
type: PropType<string>;
|
|
2277
|
+
required: false;
|
|
2278
|
+
};
|
|
2279
|
+
transitionDuration: {
|
|
2280
|
+
type: PropType<string | number | {
|
|
2281
|
+
enter: number;
|
|
2282
|
+
leave: number;
|
|
2283
|
+
show: number;
|
|
2284
|
+
hide: number;
|
|
2285
|
+
}>;
|
|
2286
|
+
required: false;
|
|
2287
|
+
};
|
|
2288
|
+
enterFromClass: {
|
|
2289
|
+
type: PropType<string>;
|
|
2290
|
+
required: false;
|
|
2291
|
+
};
|
|
2292
|
+
enterActiveClass: {
|
|
2293
|
+
type: PropType<string>;
|
|
2294
|
+
required: false;
|
|
2295
|
+
};
|
|
2296
|
+
enterToClass: {
|
|
2297
|
+
type: PropType<string>;
|
|
2298
|
+
required: false;
|
|
2299
|
+
};
|
|
2300
|
+
leaveFromClass: {
|
|
2301
|
+
type: PropType<string>;
|
|
2302
|
+
required: false;
|
|
2303
|
+
};
|
|
2304
|
+
leaveActiveClass: {
|
|
2305
|
+
type: PropType<string>;
|
|
2306
|
+
required: false;
|
|
2307
|
+
};
|
|
2308
|
+
leaveToClass: {
|
|
2309
|
+
type: PropType<string>;
|
|
2310
|
+
required: false;
|
|
2311
|
+
};
|
|
2312
|
+
showFromClass: {
|
|
2313
|
+
type: PropType<string>;
|
|
2314
|
+
required: false;
|
|
2315
|
+
};
|
|
2316
|
+
showActiveClass: {
|
|
2317
|
+
type: PropType<string>;
|
|
2318
|
+
required: false;
|
|
2319
|
+
};
|
|
2320
|
+
showToClass: {
|
|
2321
|
+
type: PropType<string>;
|
|
2322
|
+
required: false;
|
|
2323
|
+
};
|
|
2324
|
+
hideFromClass: {
|
|
2325
|
+
type: PropType<string>;
|
|
2326
|
+
required: false;
|
|
2327
|
+
};
|
|
2328
|
+
hideActiveClass: {
|
|
2329
|
+
type: PropType<string>;
|
|
2330
|
+
required: false;
|
|
2331
|
+
};
|
|
2332
|
+
hideToClass: {
|
|
2333
|
+
type: PropType<string>;
|
|
2334
|
+
required: false;
|
|
2335
|
+
};
|
|
2336
|
+
beforeEnter: {
|
|
2337
|
+
type: PropType<PropFunction>;
|
|
2338
|
+
required: false;
|
|
2339
|
+
};
|
|
2340
|
+
enter: {
|
|
2341
|
+
type: PropType<PropFunction>;
|
|
2342
|
+
required: false;
|
|
2343
|
+
};
|
|
2344
|
+
afterEnter: {
|
|
2345
|
+
type: PropType<PropFunction>;
|
|
2346
|
+
required: false;
|
|
2347
|
+
};
|
|
2348
|
+
enterCancelled: {
|
|
2349
|
+
type: PropType<PropFunction>;
|
|
2350
|
+
required: false;
|
|
2351
|
+
};
|
|
2352
|
+
beforeLeave: {
|
|
2353
|
+
type: PropType<PropFunction>;
|
|
2354
|
+
required: false;
|
|
2355
|
+
};
|
|
2356
|
+
leave: {
|
|
2357
|
+
type: PropType<PropFunction>;
|
|
2358
|
+
required: false;
|
|
2359
|
+
};
|
|
2360
|
+
afterLeave: {
|
|
2361
|
+
type: PropType<PropFunction>;
|
|
2362
|
+
required: false;
|
|
2363
|
+
};
|
|
2364
|
+
leaveCancelled: {
|
|
2365
|
+
type: PropType<PropFunction>;
|
|
2366
|
+
required: false;
|
|
2367
|
+
};
|
|
2368
|
+
beforeShow: {
|
|
2369
|
+
type: PropType<PropFunction>;
|
|
2370
|
+
required: false;
|
|
2371
|
+
};
|
|
2372
|
+
show: {
|
|
2373
|
+
type: PropType<PropFunction>;
|
|
2374
|
+
required: false;
|
|
2375
|
+
};
|
|
2376
|
+
afterShow: {
|
|
2377
|
+
type: PropType<PropFunction>;
|
|
2378
|
+
required: false;
|
|
2379
|
+
};
|
|
2380
|
+
showCancelled: {
|
|
2381
|
+
type: PropType<PropFunction>;
|
|
2382
|
+
required: false;
|
|
2383
|
+
};
|
|
2384
|
+
beforeHide: {
|
|
2385
|
+
type: PropType<PropFunction>;
|
|
2386
|
+
required: false;
|
|
2387
|
+
};
|
|
2388
|
+
hide: {
|
|
2389
|
+
type: PropType<PropFunction>;
|
|
2390
|
+
required: false;
|
|
2391
|
+
};
|
|
2392
|
+
afterHide: {
|
|
2393
|
+
type: PropType<PropFunction>;
|
|
2394
|
+
required: false;
|
|
2395
|
+
};
|
|
2396
|
+
hideCancelled: {
|
|
2397
|
+
type: PropType<PropFunction>;
|
|
2398
|
+
required: false;
|
|
2399
|
+
};
|
|
2400
|
+
}>> & Readonly<{}>, {
|
|
2401
|
+
name: string;
|
|
2402
|
+
multi: boolean;
|
|
2403
|
+
tag: string;
|
|
2404
|
+
viewTag: string;
|
|
2405
|
+
viewTagProps: {};
|
|
2406
|
+
transition: TransitionProp;
|
|
2407
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1610
2408
|
|
|
1611
|
-
declare
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
*/
|
|
1615
|
-
to?: Route;
|
|
1616
|
-
/**
|
|
1617
|
-
* 目标路由
|
|
1618
|
-
*/
|
|
1619
|
-
routeModel?: RouteModel;
|
|
1620
|
-
/**
|
|
1621
|
-
* 来源路由
|
|
1622
|
-
*/
|
|
1623
|
-
from?: Route;
|
|
1624
|
-
/**
|
|
1625
|
-
* 流程数据
|
|
1626
|
-
*/
|
|
1627
|
-
data: {
|
|
1628
|
-
[propName: string]: any;
|
|
1629
|
-
};
|
|
1630
|
-
/**
|
|
1631
|
-
* 构造函数
|
|
1632
|
-
* @param to
|
|
1633
|
-
* @param from
|
|
1634
|
-
*/
|
|
1635
|
-
constructor(to?: Route, from?: Route);
|
|
1636
|
-
/**
|
|
1637
|
-
* 转换为session
|
|
1638
|
-
* @param src
|
|
1639
|
-
* @returns
|
|
1640
|
-
*/
|
|
1641
|
-
static from(src: {
|
|
1642
|
-
[propName: string]: any;
|
|
1643
|
-
}): Session;
|
|
1644
|
-
}
|
|
2409
|
+
declare const routeSessionCacheKey: unique symbol;
|
|
2410
|
+
|
|
2411
|
+
declare const routeUpdatedCallback: unique symbol;
|
|
1645
2412
|
|
|
1646
2413
|
export declare const sessionKey: unique symbol;
|
|
1647
2414
|
|
|
2415
|
+
/**
|
|
2416
|
+
* shallow reactive state
|
|
2417
|
+
* @param state
|
|
2418
|
+
* @param options
|
|
2419
|
+
* @returns
|
|
2420
|
+
*/
|
|
2421
|
+
export declare function shallowReactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
2422
|
+
|
|
1648
2423
|
/**
|
|
1649
2424
|
* 插槽
|
|
1650
2425
|
*/
|
|
@@ -1676,6 +2451,22 @@ declare class Slot {
|
|
|
1676
2451
|
|
|
1677
2452
|
declare const _start: unique symbol;
|
|
1678
2453
|
|
|
2454
|
+
/**
|
|
2455
|
+
* state参数
|
|
2456
|
+
*/
|
|
2457
|
+
export declare type StatePersistOptions = {
|
|
2458
|
+
name?: string;
|
|
2459
|
+
persistPolicy?: StatePersistPolicy;
|
|
2460
|
+
storage?: Storage;
|
|
2461
|
+
debounce?: boolean;
|
|
2462
|
+
debounceDelay?: number;
|
|
2463
|
+
};
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* 持久化策略
|
|
2467
|
+
*/
|
|
2468
|
+
declare type StatePersistPolicy = 'memory' | 'session' | 'local' | 'custom';
|
|
2469
|
+
|
|
1679
2470
|
declare const statusKey: unique symbol;
|
|
1680
2471
|
|
|
1681
2472
|
/**
|
|
@@ -1769,6 +2560,48 @@ declare interface Tree extends TreeNode {
|
|
|
1769
2560
|
clear(): void;
|
|
1770
2561
|
}
|
|
1771
2562
|
|
|
2563
|
+
/**
|
|
2564
|
+
* 数据tree
|
|
2565
|
+
*/
|
|
2566
|
+
declare class TreeImpl extends TreeNodeImpl implements Tree {
|
|
2567
|
+
/**
|
|
2568
|
+
* 持久化处理器
|
|
2569
|
+
*/
|
|
2570
|
+
private _persistHandler;
|
|
2571
|
+
/**
|
|
2572
|
+
* 默认构造函数
|
|
2573
|
+
*/
|
|
2574
|
+
constructor(options?: PersistOptions, defaultState?: Record<string, any>);
|
|
2575
|
+
/**
|
|
2576
|
+
* 加入数据
|
|
2577
|
+
* @param args
|
|
2578
|
+
* @returns {boolean}
|
|
2579
|
+
*/
|
|
2580
|
+
put(...args: any[]): boolean;
|
|
2581
|
+
/**
|
|
2582
|
+
* 获取内容
|
|
2583
|
+
* @param args
|
|
2584
|
+
* @returns {any}
|
|
2585
|
+
*/
|
|
2586
|
+
get(...args: any[]): any | undefined;
|
|
2587
|
+
/**
|
|
2588
|
+
* 移除数据
|
|
2589
|
+
* @param args
|
|
2590
|
+
* @returns {boolean}
|
|
2591
|
+
*/
|
|
2592
|
+
remove(...args: any[]): boolean;
|
|
2593
|
+
/**
|
|
2594
|
+
* 判断是否包含数据
|
|
2595
|
+
* @param args
|
|
2596
|
+
* @returns {boolean}
|
|
2597
|
+
*/
|
|
2598
|
+
contains(...args: any[]): boolean;
|
|
2599
|
+
/**
|
|
2600
|
+
* 清空所以数据
|
|
2601
|
+
*/
|
|
2602
|
+
clear(): void;
|
|
2603
|
+
}
|
|
2604
|
+
|
|
1772
2605
|
/**
|
|
1773
2606
|
* tree node
|
|
1774
2607
|
*/
|
|
@@ -1780,6 +2613,36 @@ declare interface TreeNode {
|
|
|
1780
2613
|
[childrenKey]: Map<string, TreeNode>;
|
|
1781
2614
|
}
|
|
1782
2615
|
|
|
2616
|
+
/**
|
|
2617
|
+
* 树节点
|
|
2618
|
+
* @param id
|
|
2619
|
+
* @param data
|
|
2620
|
+
* @constructor
|
|
2621
|
+
*/
|
|
2622
|
+
declare class TreeNodeImpl implements TreeNode {
|
|
2623
|
+
/**
|
|
2624
|
+
* 自动创建解决策略
|
|
2625
|
+
*/
|
|
2626
|
+
[growKey]: boolean;
|
|
2627
|
+
/**
|
|
2628
|
+
* id
|
|
2629
|
+
*/
|
|
2630
|
+
[idKey]: string;
|
|
2631
|
+
/**
|
|
2632
|
+
* value
|
|
2633
|
+
*/
|
|
2634
|
+
[valueKey]: Ref<any>;
|
|
2635
|
+
/**
|
|
2636
|
+
* children
|
|
2637
|
+
*/
|
|
2638
|
+
[childrenKey]: Map<string, TreeNode>;
|
|
2639
|
+
/**
|
|
2640
|
+
* 构造函数
|
|
2641
|
+
* @param id
|
|
2642
|
+
*/
|
|
2643
|
+
constructor(id: string);
|
|
2644
|
+
}
|
|
2645
|
+
|
|
1783
2646
|
/**
|
|
1784
2647
|
* 判断类型
|
|
1785
2648
|
* @param obj
|
|
@@ -1810,7 +2673,7 @@ declare enum UpdateType {
|
|
|
1810
2673
|
* @param proxy
|
|
1811
2674
|
* @returns
|
|
1812
2675
|
*/
|
|
1813
|
-
export declare function useBus(proxy?: Proxy_2):
|
|
2676
|
+
export declare function useBus(proxy?: Proxy_2): BusInterface;
|
|
1814
2677
|
|
|
1815
2678
|
/**
|
|
1816
2679
|
* Returns the global event proxy
|