@fox-js/fox 3.1.1-2 → 3.1.1-21
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 +944 -75
- package/libs/index.esm.js +2911 -4456
- package/libs/index.umd.js +1 -3
- package/libs/style.css +2 -1
- 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,175 @@ 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 requireLoad
|
|
1036
|
+
* @param task
|
|
1037
|
+
* @returns
|
|
1038
|
+
*/
|
|
1039
|
+
private createDefine;
|
|
1040
|
+
/**
|
|
1041
|
+
* 创建require 加载函数
|
|
1042
|
+
* @returns
|
|
1043
|
+
*/
|
|
1044
|
+
private createRequireLoad;
|
|
1045
|
+
/**
|
|
1046
|
+
* 解析路径
|
|
1047
|
+
* @param uri
|
|
1048
|
+
* @returns
|
|
1049
|
+
*/
|
|
1050
|
+
private resolvePath;
|
|
1051
|
+
/**
|
|
1052
|
+
* 创建search字符串
|
|
1053
|
+
*/
|
|
1054
|
+
private createSearch;
|
|
1055
|
+
/**
|
|
1056
|
+
* 获取文件名后缀
|
|
1057
|
+
* @param name
|
|
1058
|
+
* @returns {string}
|
|
1059
|
+
*/
|
|
1060
|
+
private getFileNamePostfix;
|
|
1061
|
+
/**
|
|
1062
|
+
* 是否为不处理的路径
|
|
1063
|
+
* @param uri
|
|
1064
|
+
* @return
|
|
1065
|
+
*/
|
|
1066
|
+
private isNaturePath;
|
|
1067
|
+
/**
|
|
1068
|
+
* 解析路径
|
|
1069
|
+
* @param uri
|
|
1070
|
+
* @param replace
|
|
1071
|
+
*/
|
|
1072
|
+
private parserPath;
|
|
1073
|
+
}
|
|
875
1074
|
|
|
876
|
-
declare const
|
|
1075
|
+
declare const _resolveComponent: unique symbol;
|
|
877
1076
|
|
|
878
1077
|
declare const rootKey: unique symbol;
|
|
879
1078
|
|
|
@@ -922,9 +1121,7 @@ export declare class Route {
|
|
|
922
1121
|
/**
|
|
923
1122
|
* 获取匹配的元数组列表
|
|
924
1123
|
*/
|
|
925
|
-
matched?:
|
|
926
|
-
meta: Record<string | number | symbol, any>;
|
|
927
|
-
}[];
|
|
1124
|
+
matched?: Array<Route>;
|
|
928
1125
|
/**
|
|
929
1126
|
* route本身的元数据
|
|
930
1127
|
*/
|
|
@@ -958,7 +1155,7 @@ export declare class Route {
|
|
|
958
1155
|
/**
|
|
959
1156
|
* 历史更新策略
|
|
960
1157
|
*/
|
|
961
|
-
historyUpdatePolicy?:
|
|
1158
|
+
historyUpdatePolicy?: HistoryUpdatePolicy_2;
|
|
962
1159
|
/**
|
|
963
1160
|
* view属性集合(用于multi view的tab view属性)
|
|
964
1161
|
*/
|
|
@@ -975,10 +1172,6 @@ export declare class Route {
|
|
|
975
1172
|
* 插槽(用于历史还原)
|
|
976
1173
|
*/
|
|
977
1174
|
slot?: Slot;
|
|
978
|
-
/**
|
|
979
|
-
* session(router执行链路session)
|
|
980
|
-
*/
|
|
981
|
-
session?: Session;
|
|
982
1175
|
/**
|
|
983
1176
|
* 克隆
|
|
984
1177
|
* @param target
|
|
@@ -993,12 +1186,13 @@ export declare class Route {
|
|
|
993
1186
|
*/
|
|
994
1187
|
static isSame(x: Route, y: Route): boolean;
|
|
995
1188
|
/**
|
|
996
|
-
*
|
|
1189
|
+
* 判断路由路径是一致
|
|
1190
|
+
* route.name 一致 or route.path一致
|
|
997
1191
|
* @param x
|
|
998
1192
|
* @param y
|
|
999
1193
|
* @returns
|
|
1000
1194
|
*/
|
|
1001
|
-
static
|
|
1195
|
+
static isSamePathForRoute(x: Route, y: Route): boolean;
|
|
1002
1196
|
/**
|
|
1003
1197
|
* 由对象生成路由
|
|
1004
1198
|
* @param obj
|
|
@@ -1069,6 +1263,14 @@ declare class RouteModel {
|
|
|
1069
1263
|
* 名称
|
|
1070
1264
|
*/
|
|
1071
1265
|
name?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* 元数据
|
|
1268
|
+
*/
|
|
1269
|
+
meta?: Record<string | number | symbol, any>;
|
|
1270
|
+
/**
|
|
1271
|
+
* matched routes 当前路由及其所有父路由的匹配记录
|
|
1272
|
+
*/
|
|
1273
|
+
matchedRoutes?: Array<Route>;
|
|
1072
1274
|
/**
|
|
1073
1275
|
* layer集合
|
|
1074
1276
|
*/
|
|
@@ -1108,6 +1310,14 @@ export declare class Router {
|
|
|
1108
1310
|
* 当前路由集合
|
|
1109
1311
|
*/
|
|
1110
1312
|
private [currentRoutes];
|
|
1313
|
+
/**
|
|
1314
|
+
* 当前路由
|
|
1315
|
+
*/
|
|
1316
|
+
private [currentRoute];
|
|
1317
|
+
/**
|
|
1318
|
+
* route sessin key
|
|
1319
|
+
*/
|
|
1320
|
+
private [routeSessionCacheKey];
|
|
1111
1321
|
/**
|
|
1112
1322
|
* 错误回调
|
|
1113
1323
|
*/
|
|
@@ -1144,14 +1354,174 @@ export declare class Router {
|
|
|
1144
1354
|
* 是否初始化
|
|
1145
1355
|
*/
|
|
1146
1356
|
private [initKey];
|
|
1147
|
-
/**
|
|
1148
|
-
* 当前最新路由
|
|
1149
|
-
*/
|
|
1150
|
-
private [currentKey];
|
|
1151
1357
|
/**
|
|
1152
1358
|
* 获取当前最新route
|
|
1153
1359
|
*/
|
|
1154
|
-
get
|
|
1360
|
+
get currentRoute(): Readonly<Ref< {
|
|
1361
|
+
readonly path?: string | undefined;
|
|
1362
|
+
readonly fullPath?: string | undefined;
|
|
1363
|
+
readonly alias?: string | undefined;
|
|
1364
|
+
readonly name?: string | undefined;
|
|
1365
|
+
readonly root?: string | undefined;
|
|
1366
|
+
readonly params?: {
|
|
1367
|
+
readonly [x: string]: any;
|
|
1368
|
+
readonly [x: number]: any;
|
|
1369
|
+
readonly [x: symbol]: any;
|
|
1370
|
+
} | undefined;
|
|
1371
|
+
readonly query?: any;
|
|
1372
|
+
readonly traceless?: boolean | undefined;
|
|
1373
|
+
readonly template?: string | undefined;
|
|
1374
|
+
readonly matched?: readonly {
|
|
1375
|
+
readonly path?: string | undefined;
|
|
1376
|
+
readonly fullPath: string;
|
|
1377
|
+
readonly alias?: string | undefined;
|
|
1378
|
+
readonly name?: string | undefined;
|
|
1379
|
+
readonly root?: string | undefined;
|
|
1380
|
+
readonly params?: {
|
|
1381
|
+
readonly [x: string]: any;
|
|
1382
|
+
readonly [x: number]: any;
|
|
1383
|
+
readonly [x: symbol]: any;
|
|
1384
|
+
} | undefined;
|
|
1385
|
+
readonly query?: any;
|
|
1386
|
+
readonly traceless?: boolean | undefined;
|
|
1387
|
+
readonly template?: string | undefined;
|
|
1388
|
+
readonly matched?: readonly /*elided*/ any[] | undefined;
|
|
1389
|
+
readonly meta?: {
|
|
1390
|
+
readonly [x: string]: any;
|
|
1391
|
+
readonly [x: number]: any;
|
|
1392
|
+
readonly [x: symbol]: any;
|
|
1393
|
+
} | undefined;
|
|
1394
|
+
readonly success?: {
|
|
1395
|
+
(...arg: any[]): void;
|
|
1396
|
+
} | undefined;
|
|
1397
|
+
readonly error?: {
|
|
1398
|
+
(...arg: any[]): void;
|
|
1399
|
+
} | undefined;
|
|
1400
|
+
readonly destroy?: {
|
|
1401
|
+
(...arg: any[]): void;
|
|
1402
|
+
} | undefined;
|
|
1403
|
+
readonly opsType?: OperationType | undefined;
|
|
1404
|
+
readonly updateType?: UpdateType | undefined;
|
|
1405
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1406
|
+
readonly viewTagAttrs?: any;
|
|
1407
|
+
readonly index?: number | undefined;
|
|
1408
|
+
readonly active?: boolean | undefined;
|
|
1409
|
+
readonly slot?: {
|
|
1410
|
+
readonly name: string;
|
|
1411
|
+
readonly level: number;
|
|
1412
|
+
readonly rootName: string | undefined;
|
|
1413
|
+
readonly rootIndex: number;
|
|
1414
|
+
} | undefined;
|
|
1415
|
+
}[] | undefined;
|
|
1416
|
+
readonly meta?: {
|
|
1417
|
+
readonly [x: string]: any;
|
|
1418
|
+
readonly [x: number]: any;
|
|
1419
|
+
readonly [x: symbol]: any;
|
|
1420
|
+
} | undefined;
|
|
1421
|
+
readonly success?: {
|
|
1422
|
+
(...arg: any[]): void;
|
|
1423
|
+
} | undefined;
|
|
1424
|
+
readonly error?: {
|
|
1425
|
+
(...arg: any[]): void;
|
|
1426
|
+
} | undefined;
|
|
1427
|
+
readonly destroy?: {
|
|
1428
|
+
(...arg: any[]): void;
|
|
1429
|
+
} | undefined;
|
|
1430
|
+
readonly opsType?: OperationType | undefined;
|
|
1431
|
+
readonly updateType?: UpdateType | undefined;
|
|
1432
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1433
|
+
readonly viewTagAttrs?: any;
|
|
1434
|
+
readonly index?: number | undefined;
|
|
1435
|
+
readonly active?: boolean | undefined;
|
|
1436
|
+
readonly slot?: {
|
|
1437
|
+
readonly name: string;
|
|
1438
|
+
readonly level: number;
|
|
1439
|
+
readonly rootName: string | undefined;
|
|
1440
|
+
readonly rootIndex: number;
|
|
1441
|
+
} | undefined;
|
|
1442
|
+
} | null, {
|
|
1443
|
+
readonly path?: string | undefined;
|
|
1444
|
+
readonly fullPath?: string | undefined;
|
|
1445
|
+
readonly alias?: string | undefined;
|
|
1446
|
+
readonly name?: string | undefined;
|
|
1447
|
+
readonly root?: string | undefined;
|
|
1448
|
+
readonly params?: {
|
|
1449
|
+
readonly [x: string]: any;
|
|
1450
|
+
readonly [x: number]: any;
|
|
1451
|
+
readonly [x: symbol]: any;
|
|
1452
|
+
} | undefined;
|
|
1453
|
+
readonly query?: any;
|
|
1454
|
+
readonly traceless?: boolean | undefined;
|
|
1455
|
+
readonly template?: string | undefined;
|
|
1456
|
+
readonly matched?: readonly {
|
|
1457
|
+
readonly path?: string | undefined;
|
|
1458
|
+
readonly fullPath: string;
|
|
1459
|
+
readonly alias?: string | undefined;
|
|
1460
|
+
readonly name?: string | undefined;
|
|
1461
|
+
readonly root?: string | undefined;
|
|
1462
|
+
readonly params?: {
|
|
1463
|
+
readonly [x: string]: any;
|
|
1464
|
+
readonly [x: number]: any;
|
|
1465
|
+
readonly [x: symbol]: any;
|
|
1466
|
+
} | undefined;
|
|
1467
|
+
readonly query?: any;
|
|
1468
|
+
readonly traceless?: boolean | undefined;
|
|
1469
|
+
readonly template?: string | undefined;
|
|
1470
|
+
readonly matched?: readonly /*elided*/ any[] | undefined;
|
|
1471
|
+
readonly meta?: {
|
|
1472
|
+
readonly [x: string]: any;
|
|
1473
|
+
readonly [x: number]: any;
|
|
1474
|
+
readonly [x: symbol]: any;
|
|
1475
|
+
} | undefined;
|
|
1476
|
+
readonly success?: {
|
|
1477
|
+
(...arg: any[]): void;
|
|
1478
|
+
} | undefined;
|
|
1479
|
+
readonly error?: {
|
|
1480
|
+
(...arg: any[]): void;
|
|
1481
|
+
} | undefined;
|
|
1482
|
+
readonly destroy?: {
|
|
1483
|
+
(...arg: any[]): void;
|
|
1484
|
+
} | undefined;
|
|
1485
|
+
readonly opsType?: OperationType | undefined;
|
|
1486
|
+
readonly updateType?: UpdateType | undefined;
|
|
1487
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1488
|
+
readonly viewTagAttrs?: any;
|
|
1489
|
+
readonly index?: number | undefined;
|
|
1490
|
+
readonly active?: boolean | undefined;
|
|
1491
|
+
readonly slot?: {
|
|
1492
|
+
readonly name: string;
|
|
1493
|
+
readonly level: number;
|
|
1494
|
+
readonly rootName: string | undefined;
|
|
1495
|
+
readonly rootIndex: number;
|
|
1496
|
+
} | undefined;
|
|
1497
|
+
}[] | undefined;
|
|
1498
|
+
readonly meta?: {
|
|
1499
|
+
readonly [x: string]: any;
|
|
1500
|
+
readonly [x: number]: any;
|
|
1501
|
+
readonly [x: symbol]: any;
|
|
1502
|
+
} | undefined;
|
|
1503
|
+
readonly success?: {
|
|
1504
|
+
(...arg: any[]): void;
|
|
1505
|
+
} | undefined;
|
|
1506
|
+
readonly error?: {
|
|
1507
|
+
(...arg: any[]): void;
|
|
1508
|
+
} | undefined;
|
|
1509
|
+
readonly destroy?: {
|
|
1510
|
+
(...arg: any[]): void;
|
|
1511
|
+
} | undefined;
|
|
1512
|
+
readonly opsType?: OperationType | undefined;
|
|
1513
|
+
readonly updateType?: UpdateType | undefined;
|
|
1514
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1515
|
+
readonly viewTagAttrs?: any;
|
|
1516
|
+
readonly index?: number | undefined;
|
|
1517
|
+
readonly active?: boolean | undefined;
|
|
1518
|
+
readonly slot?: {
|
|
1519
|
+
readonly name: string;
|
|
1520
|
+
readonly level: number;
|
|
1521
|
+
readonly rootName: string | undefined;
|
|
1522
|
+
readonly rootIndex: number;
|
|
1523
|
+
} | undefined;
|
|
1524
|
+
} | null>>;
|
|
1155
1525
|
private options;
|
|
1156
1526
|
/**
|
|
1157
1527
|
* 构造函数
|
|
@@ -1337,11 +1707,11 @@ export declare class Router {
|
|
|
1337
1707
|
*/
|
|
1338
1708
|
private [_findRouteModel];
|
|
1339
1709
|
/**
|
|
1340
|
-
*
|
|
1710
|
+
* 解析并格式化路由
|
|
1341
1711
|
* @param args
|
|
1342
1712
|
* @returns
|
|
1343
1713
|
*/
|
|
1344
|
-
[
|
|
1714
|
+
[normalizeRoute](args: any): Route | null;
|
|
1345
1715
|
/**
|
|
1346
1716
|
* 路由跳转(operation类型为Push)
|
|
1347
1717
|
* @param args
|
|
@@ -1367,7 +1737,7 @@ export declare class Router {
|
|
|
1367
1737
|
* @param term
|
|
1368
1738
|
* @param changeHistory
|
|
1369
1739
|
*/
|
|
1370
|
-
remove(term?:
|
|
1740
|
+
remove(term?: RemoveRouteCondition, changeHistory?: boolean): Promise<boolean>;
|
|
1371
1741
|
/**
|
|
1372
1742
|
* 路由跳转(operation类型为Open)
|
|
1373
1743
|
* @param args
|
|
@@ -1574,6 +1944,82 @@ declare interface RouterHistory {
|
|
|
1574
1944
|
setRestorePoint(routes?: Array<Route>): void;
|
|
1575
1945
|
}
|
|
1576
1946
|
|
|
1947
|
+
/**
|
|
1948
|
+
* router link
|
|
1949
|
+
*/
|
|
1950
|
+
export declare let RouterLink: DefineComponent<ExtractPropTypes< {
|
|
1951
|
+
tag: {
|
|
1952
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1953
|
+
required: false;
|
|
1954
|
+
default: string;
|
|
1955
|
+
};
|
|
1956
|
+
to: {
|
|
1957
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1958
|
+
required: true;
|
|
1959
|
+
};
|
|
1960
|
+
root: {
|
|
1961
|
+
type: PropType<string>;
|
|
1962
|
+
};
|
|
1963
|
+
activeClass: {
|
|
1964
|
+
type: PropType<string | GenericFunction>;
|
|
1965
|
+
required: false;
|
|
1966
|
+
default: string;
|
|
1967
|
+
};
|
|
1968
|
+
exact: {
|
|
1969
|
+
type: PropType<string | boolean | GenericFunction>;
|
|
1970
|
+
required: false;
|
|
1971
|
+
};
|
|
1972
|
+
exactActiveClass: {
|
|
1973
|
+
type: PropType<string | GenericFunction>;
|
|
1974
|
+
required: false;
|
|
1975
|
+
default: string;
|
|
1976
|
+
};
|
|
1977
|
+
event: {
|
|
1978
|
+
type: PropType<string | GenericFunction>;
|
|
1979
|
+
required: false;
|
|
1980
|
+
default: string;
|
|
1981
|
+
};
|
|
1982
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
1983
|
+
[key: string]: any;
|
|
1984
|
+
}> | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1985
|
+
tag: {
|
|
1986
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1987
|
+
required: false;
|
|
1988
|
+
default: string;
|
|
1989
|
+
};
|
|
1990
|
+
to: {
|
|
1991
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
1992
|
+
required: true;
|
|
1993
|
+
};
|
|
1994
|
+
root: {
|
|
1995
|
+
type: PropType<string>;
|
|
1996
|
+
};
|
|
1997
|
+
activeClass: {
|
|
1998
|
+
type: PropType<string | GenericFunction>;
|
|
1999
|
+
required: false;
|
|
2000
|
+
default: string;
|
|
2001
|
+
};
|
|
2002
|
+
exact: {
|
|
2003
|
+
type: PropType<string | boolean | GenericFunction>;
|
|
2004
|
+
required: false;
|
|
2005
|
+
};
|
|
2006
|
+
exactActiveClass: {
|
|
2007
|
+
type: PropType<string | GenericFunction>;
|
|
2008
|
+
required: false;
|
|
2009
|
+
default: string;
|
|
2010
|
+
};
|
|
2011
|
+
event: {
|
|
2012
|
+
type: PropType<string | GenericFunction>;
|
|
2013
|
+
required: false;
|
|
2014
|
+
default: string;
|
|
2015
|
+
};
|
|
2016
|
+
}>> & Readonly<{}>, {
|
|
2017
|
+
tag: string;
|
|
2018
|
+
activeClass: string | GenericFunction;
|
|
2019
|
+
exactActiveClass: string | GenericFunction;
|
|
2020
|
+
event: string | GenericFunction;
|
|
2021
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2022
|
+
|
|
1577
2023
|
/**
|
|
1578
2024
|
* router options
|
|
1579
2025
|
*/
|
|
@@ -1606,45 +2052,380 @@ export declare interface RouterOptions {
|
|
|
1606
2052
|
notFoundPath?: string;
|
|
1607
2053
|
}
|
|
1608
2054
|
|
|
1609
|
-
|
|
2055
|
+
/**
|
|
2056
|
+
* router view
|
|
2057
|
+
*/
|
|
2058
|
+
export declare const RouterView: DefineComponent<ExtractPropTypes< {
|
|
2059
|
+
name: {
|
|
2060
|
+
type: PropType<string>;
|
|
2061
|
+
required: false;
|
|
2062
|
+
default: string;
|
|
2063
|
+
};
|
|
2064
|
+
modelSlot: {
|
|
2065
|
+
type: PropType<ModelSlot>;
|
|
2066
|
+
required: false;
|
|
2067
|
+
};
|
|
2068
|
+
multi: {
|
|
2069
|
+
type: PropType<boolean>;
|
|
2070
|
+
required: false;
|
|
2071
|
+
default: boolean;
|
|
2072
|
+
};
|
|
2073
|
+
tag: {
|
|
2074
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2075
|
+
required: false;
|
|
2076
|
+
default: string;
|
|
2077
|
+
};
|
|
2078
|
+
viewTag: {
|
|
2079
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2080
|
+
required: false;
|
|
2081
|
+
default: string;
|
|
2082
|
+
};
|
|
2083
|
+
viewTagProps: {
|
|
2084
|
+
type: PropType<unknown | PropFunction>;
|
|
2085
|
+
required: false;
|
|
2086
|
+
default(): {};
|
|
2087
|
+
};
|
|
2088
|
+
viewClass: {
|
|
2089
|
+
type: PropType<string | PropFunction>;
|
|
2090
|
+
required: false;
|
|
2091
|
+
};
|
|
2092
|
+
viewActiveClass: {
|
|
2093
|
+
type: PropType<string | PropFunction>;
|
|
2094
|
+
required: false;
|
|
2095
|
+
};
|
|
2096
|
+
viewInactiveClass: {
|
|
2097
|
+
type: PropType<string | PropFunction>;
|
|
2098
|
+
required: false;
|
|
2099
|
+
};
|
|
2100
|
+
transition: {
|
|
2101
|
+
type: PropType<TransitionProp>;
|
|
2102
|
+
required: false;
|
|
2103
|
+
default: boolean;
|
|
2104
|
+
};
|
|
2105
|
+
transitionName: {
|
|
2106
|
+
type: PropType<string>;
|
|
2107
|
+
required: false;
|
|
2108
|
+
};
|
|
2109
|
+
transitionDuration: {
|
|
2110
|
+
type: PropType<string | number | {
|
|
2111
|
+
enter: number;
|
|
2112
|
+
leave: number;
|
|
2113
|
+
show: number;
|
|
2114
|
+
hide: number;
|
|
2115
|
+
}>;
|
|
2116
|
+
required: false;
|
|
2117
|
+
};
|
|
2118
|
+
enterFromClass: {
|
|
2119
|
+
type: PropType<string>;
|
|
2120
|
+
required: false;
|
|
2121
|
+
};
|
|
2122
|
+
enterActiveClass: {
|
|
2123
|
+
type: PropType<string>;
|
|
2124
|
+
required: false;
|
|
2125
|
+
};
|
|
2126
|
+
enterToClass: {
|
|
2127
|
+
type: PropType<string>;
|
|
2128
|
+
required: false;
|
|
2129
|
+
};
|
|
2130
|
+
leaveFromClass: {
|
|
2131
|
+
type: PropType<string>;
|
|
2132
|
+
required: false;
|
|
2133
|
+
};
|
|
2134
|
+
leaveActiveClass: {
|
|
2135
|
+
type: PropType<string>;
|
|
2136
|
+
required: false;
|
|
2137
|
+
};
|
|
2138
|
+
leaveToClass: {
|
|
2139
|
+
type: PropType<string>;
|
|
2140
|
+
required: false;
|
|
2141
|
+
};
|
|
2142
|
+
showFromClass: {
|
|
2143
|
+
type: PropType<string>;
|
|
2144
|
+
required: false;
|
|
2145
|
+
};
|
|
2146
|
+
showActiveClass: {
|
|
2147
|
+
type: PropType<string>;
|
|
2148
|
+
required: false;
|
|
2149
|
+
};
|
|
2150
|
+
showToClass: {
|
|
2151
|
+
type: PropType<string>;
|
|
2152
|
+
required: false;
|
|
2153
|
+
};
|
|
2154
|
+
hideFromClass: {
|
|
2155
|
+
type: PropType<string>;
|
|
2156
|
+
required: false;
|
|
2157
|
+
};
|
|
2158
|
+
hideActiveClass: {
|
|
2159
|
+
type: PropType<string>;
|
|
2160
|
+
required: false;
|
|
2161
|
+
};
|
|
2162
|
+
hideToClass: {
|
|
2163
|
+
type: PropType<string>;
|
|
2164
|
+
required: false;
|
|
2165
|
+
};
|
|
2166
|
+
beforeEnter: {
|
|
2167
|
+
type: PropType<PropFunction>;
|
|
2168
|
+
required: false;
|
|
2169
|
+
};
|
|
2170
|
+
enter: {
|
|
2171
|
+
type: PropType<PropFunction>;
|
|
2172
|
+
required: false;
|
|
2173
|
+
};
|
|
2174
|
+
afterEnter: {
|
|
2175
|
+
type: PropType<PropFunction>;
|
|
2176
|
+
required: false;
|
|
2177
|
+
};
|
|
2178
|
+
enterCancelled: {
|
|
2179
|
+
type: PropType<PropFunction>;
|
|
2180
|
+
required: false;
|
|
2181
|
+
};
|
|
2182
|
+
beforeLeave: {
|
|
2183
|
+
type: PropType<PropFunction>;
|
|
2184
|
+
required: false;
|
|
2185
|
+
};
|
|
2186
|
+
leave: {
|
|
2187
|
+
type: PropType<PropFunction>;
|
|
2188
|
+
required: false;
|
|
2189
|
+
};
|
|
2190
|
+
afterLeave: {
|
|
2191
|
+
type: PropType<PropFunction>;
|
|
2192
|
+
required: false;
|
|
2193
|
+
};
|
|
2194
|
+
leaveCancelled: {
|
|
2195
|
+
type: PropType<PropFunction>;
|
|
2196
|
+
required: false;
|
|
2197
|
+
};
|
|
2198
|
+
beforeShow: {
|
|
2199
|
+
type: PropType<PropFunction>;
|
|
2200
|
+
required: false;
|
|
2201
|
+
};
|
|
2202
|
+
show: {
|
|
2203
|
+
type: PropType<PropFunction>;
|
|
2204
|
+
required: false;
|
|
2205
|
+
};
|
|
2206
|
+
afterShow: {
|
|
2207
|
+
type: PropType<PropFunction>;
|
|
2208
|
+
required: false;
|
|
2209
|
+
};
|
|
2210
|
+
showCancelled: {
|
|
2211
|
+
type: PropType<PropFunction>;
|
|
2212
|
+
required: false;
|
|
2213
|
+
};
|
|
2214
|
+
beforeHide: {
|
|
2215
|
+
type: PropType<PropFunction>;
|
|
2216
|
+
required: false;
|
|
2217
|
+
};
|
|
2218
|
+
hide: {
|
|
2219
|
+
type: PropType<PropFunction>;
|
|
2220
|
+
required: false;
|
|
2221
|
+
};
|
|
2222
|
+
afterHide: {
|
|
2223
|
+
type: PropType<PropFunction>;
|
|
2224
|
+
required: false;
|
|
2225
|
+
};
|
|
2226
|
+
hideCancelled: {
|
|
2227
|
+
type: PropType<PropFunction>;
|
|
2228
|
+
required: false;
|
|
2229
|
+
};
|
|
2230
|
+
}>, (() => VNode<RendererNode, RendererElement, {
|
|
2231
|
+
[key: string]: any;
|
|
2232
|
+
}> | VNode<RendererNode, RendererElement, {
|
|
2233
|
+
[key: string]: any;
|
|
2234
|
+
}>[] | null) | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2235
|
+
name: {
|
|
2236
|
+
type: PropType<string>;
|
|
2237
|
+
required: false;
|
|
2238
|
+
default: string;
|
|
2239
|
+
};
|
|
2240
|
+
modelSlot: {
|
|
2241
|
+
type: PropType<ModelSlot>;
|
|
2242
|
+
required: false;
|
|
2243
|
+
};
|
|
2244
|
+
multi: {
|
|
2245
|
+
type: PropType<boolean>;
|
|
2246
|
+
required: false;
|
|
2247
|
+
default: boolean;
|
|
2248
|
+
};
|
|
2249
|
+
tag: {
|
|
2250
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2251
|
+
required: false;
|
|
2252
|
+
default: string;
|
|
2253
|
+
};
|
|
2254
|
+
viewTag: {
|
|
2255
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2256
|
+
required: false;
|
|
2257
|
+
default: string;
|
|
2258
|
+
};
|
|
2259
|
+
viewTagProps: {
|
|
2260
|
+
type: PropType<unknown | PropFunction>;
|
|
2261
|
+
required: false;
|
|
2262
|
+
default(): {};
|
|
2263
|
+
};
|
|
2264
|
+
viewClass: {
|
|
2265
|
+
type: PropType<string | PropFunction>;
|
|
2266
|
+
required: false;
|
|
2267
|
+
};
|
|
2268
|
+
viewActiveClass: {
|
|
2269
|
+
type: PropType<string | PropFunction>;
|
|
2270
|
+
required: false;
|
|
2271
|
+
};
|
|
2272
|
+
viewInactiveClass: {
|
|
2273
|
+
type: PropType<string | PropFunction>;
|
|
2274
|
+
required: false;
|
|
2275
|
+
};
|
|
2276
|
+
transition: {
|
|
2277
|
+
type: PropType<TransitionProp>;
|
|
2278
|
+
required: false;
|
|
2279
|
+
default: boolean;
|
|
2280
|
+
};
|
|
2281
|
+
transitionName: {
|
|
2282
|
+
type: PropType<string>;
|
|
2283
|
+
required: false;
|
|
2284
|
+
};
|
|
2285
|
+
transitionDuration: {
|
|
2286
|
+
type: PropType<string | number | {
|
|
2287
|
+
enter: number;
|
|
2288
|
+
leave: number;
|
|
2289
|
+
show: number;
|
|
2290
|
+
hide: number;
|
|
2291
|
+
}>;
|
|
2292
|
+
required: false;
|
|
2293
|
+
};
|
|
2294
|
+
enterFromClass: {
|
|
2295
|
+
type: PropType<string>;
|
|
2296
|
+
required: false;
|
|
2297
|
+
};
|
|
2298
|
+
enterActiveClass: {
|
|
2299
|
+
type: PropType<string>;
|
|
2300
|
+
required: false;
|
|
2301
|
+
};
|
|
2302
|
+
enterToClass: {
|
|
2303
|
+
type: PropType<string>;
|
|
2304
|
+
required: false;
|
|
2305
|
+
};
|
|
2306
|
+
leaveFromClass: {
|
|
2307
|
+
type: PropType<string>;
|
|
2308
|
+
required: false;
|
|
2309
|
+
};
|
|
2310
|
+
leaveActiveClass: {
|
|
2311
|
+
type: PropType<string>;
|
|
2312
|
+
required: false;
|
|
2313
|
+
};
|
|
2314
|
+
leaveToClass: {
|
|
2315
|
+
type: PropType<string>;
|
|
2316
|
+
required: false;
|
|
2317
|
+
};
|
|
2318
|
+
showFromClass: {
|
|
2319
|
+
type: PropType<string>;
|
|
2320
|
+
required: false;
|
|
2321
|
+
};
|
|
2322
|
+
showActiveClass: {
|
|
2323
|
+
type: PropType<string>;
|
|
2324
|
+
required: false;
|
|
2325
|
+
};
|
|
2326
|
+
showToClass: {
|
|
2327
|
+
type: PropType<string>;
|
|
2328
|
+
required: false;
|
|
2329
|
+
};
|
|
2330
|
+
hideFromClass: {
|
|
2331
|
+
type: PropType<string>;
|
|
2332
|
+
required: false;
|
|
2333
|
+
};
|
|
2334
|
+
hideActiveClass: {
|
|
2335
|
+
type: PropType<string>;
|
|
2336
|
+
required: false;
|
|
2337
|
+
};
|
|
2338
|
+
hideToClass: {
|
|
2339
|
+
type: PropType<string>;
|
|
2340
|
+
required: false;
|
|
2341
|
+
};
|
|
2342
|
+
beforeEnter: {
|
|
2343
|
+
type: PropType<PropFunction>;
|
|
2344
|
+
required: false;
|
|
2345
|
+
};
|
|
2346
|
+
enter: {
|
|
2347
|
+
type: PropType<PropFunction>;
|
|
2348
|
+
required: false;
|
|
2349
|
+
};
|
|
2350
|
+
afterEnter: {
|
|
2351
|
+
type: PropType<PropFunction>;
|
|
2352
|
+
required: false;
|
|
2353
|
+
};
|
|
2354
|
+
enterCancelled: {
|
|
2355
|
+
type: PropType<PropFunction>;
|
|
2356
|
+
required: false;
|
|
2357
|
+
};
|
|
2358
|
+
beforeLeave: {
|
|
2359
|
+
type: PropType<PropFunction>;
|
|
2360
|
+
required: false;
|
|
2361
|
+
};
|
|
2362
|
+
leave: {
|
|
2363
|
+
type: PropType<PropFunction>;
|
|
2364
|
+
required: false;
|
|
2365
|
+
};
|
|
2366
|
+
afterLeave: {
|
|
2367
|
+
type: PropType<PropFunction>;
|
|
2368
|
+
required: false;
|
|
2369
|
+
};
|
|
2370
|
+
leaveCancelled: {
|
|
2371
|
+
type: PropType<PropFunction>;
|
|
2372
|
+
required: false;
|
|
2373
|
+
};
|
|
2374
|
+
beforeShow: {
|
|
2375
|
+
type: PropType<PropFunction>;
|
|
2376
|
+
required: false;
|
|
2377
|
+
};
|
|
2378
|
+
show: {
|
|
2379
|
+
type: PropType<PropFunction>;
|
|
2380
|
+
required: false;
|
|
2381
|
+
};
|
|
2382
|
+
afterShow: {
|
|
2383
|
+
type: PropType<PropFunction>;
|
|
2384
|
+
required: false;
|
|
2385
|
+
};
|
|
2386
|
+
showCancelled: {
|
|
2387
|
+
type: PropType<PropFunction>;
|
|
2388
|
+
required: false;
|
|
2389
|
+
};
|
|
2390
|
+
beforeHide: {
|
|
2391
|
+
type: PropType<PropFunction>;
|
|
2392
|
+
required: false;
|
|
2393
|
+
};
|
|
2394
|
+
hide: {
|
|
2395
|
+
type: PropType<PropFunction>;
|
|
2396
|
+
required: false;
|
|
2397
|
+
};
|
|
2398
|
+
afterHide: {
|
|
2399
|
+
type: PropType<PropFunction>;
|
|
2400
|
+
required: false;
|
|
2401
|
+
};
|
|
2402
|
+
hideCancelled: {
|
|
2403
|
+
type: PropType<PropFunction>;
|
|
2404
|
+
required: false;
|
|
2405
|
+
};
|
|
2406
|
+
}>> & Readonly<{}>, {
|
|
2407
|
+
name: string;
|
|
2408
|
+
multi: boolean;
|
|
2409
|
+
tag: string;
|
|
2410
|
+
viewTag: string;
|
|
2411
|
+
viewTagProps: {};
|
|
2412
|
+
transition: TransitionProp;
|
|
2413
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1610
2414
|
|
|
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
|
-
}
|
|
2415
|
+
declare const routeSessionCacheKey: unique symbol;
|
|
2416
|
+
|
|
2417
|
+
declare const routeUpdatedCallback: unique symbol;
|
|
1645
2418
|
|
|
1646
2419
|
export declare const sessionKey: unique symbol;
|
|
1647
2420
|
|
|
2421
|
+
/**
|
|
2422
|
+
* shallow reactive state
|
|
2423
|
+
* @param state
|
|
2424
|
+
* @param options
|
|
2425
|
+
* @returns
|
|
2426
|
+
*/
|
|
2427
|
+
export declare function shallowReactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
2428
|
+
|
|
1648
2429
|
/**
|
|
1649
2430
|
* 插槽
|
|
1650
2431
|
*/
|
|
@@ -1676,6 +2457,22 @@ declare class Slot {
|
|
|
1676
2457
|
|
|
1677
2458
|
declare const _start: unique symbol;
|
|
1678
2459
|
|
|
2460
|
+
/**
|
|
2461
|
+
* state参数
|
|
2462
|
+
*/
|
|
2463
|
+
export declare type StatePersistOptions = {
|
|
2464
|
+
name?: string;
|
|
2465
|
+
persistPolicy?: StatePersistPolicy;
|
|
2466
|
+
storage?: Storage;
|
|
2467
|
+
debounce?: boolean;
|
|
2468
|
+
debounceDelay?: number;
|
|
2469
|
+
};
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* 持久化策略
|
|
2473
|
+
*/
|
|
2474
|
+
declare type StatePersistPolicy = 'memory' | 'session' | 'local' | 'custom';
|
|
2475
|
+
|
|
1679
2476
|
declare const statusKey: unique symbol;
|
|
1680
2477
|
|
|
1681
2478
|
/**
|
|
@@ -1769,6 +2566,48 @@ declare interface Tree extends TreeNode {
|
|
|
1769
2566
|
clear(): void;
|
|
1770
2567
|
}
|
|
1771
2568
|
|
|
2569
|
+
/**
|
|
2570
|
+
* 数据tree
|
|
2571
|
+
*/
|
|
2572
|
+
declare class TreeImpl extends TreeNodeImpl implements Tree {
|
|
2573
|
+
/**
|
|
2574
|
+
* 持久化处理器
|
|
2575
|
+
*/
|
|
2576
|
+
private _persistHandler;
|
|
2577
|
+
/**
|
|
2578
|
+
* 默认构造函数
|
|
2579
|
+
*/
|
|
2580
|
+
constructor(options?: PersistOptions, defaultState?: Record<string, any>);
|
|
2581
|
+
/**
|
|
2582
|
+
* 加入数据
|
|
2583
|
+
* @param args
|
|
2584
|
+
* @returns {boolean}
|
|
2585
|
+
*/
|
|
2586
|
+
put(...args: any[]): boolean;
|
|
2587
|
+
/**
|
|
2588
|
+
* 获取内容
|
|
2589
|
+
* @param args
|
|
2590
|
+
* @returns {any}
|
|
2591
|
+
*/
|
|
2592
|
+
get(...args: any[]): any | undefined;
|
|
2593
|
+
/**
|
|
2594
|
+
* 移除数据
|
|
2595
|
+
* @param args
|
|
2596
|
+
* @returns {boolean}
|
|
2597
|
+
*/
|
|
2598
|
+
remove(...args: any[]): boolean;
|
|
2599
|
+
/**
|
|
2600
|
+
* 判断是否包含数据
|
|
2601
|
+
* @param args
|
|
2602
|
+
* @returns {boolean}
|
|
2603
|
+
*/
|
|
2604
|
+
contains(...args: any[]): boolean;
|
|
2605
|
+
/**
|
|
2606
|
+
* 清空所以数据
|
|
2607
|
+
*/
|
|
2608
|
+
clear(): void;
|
|
2609
|
+
}
|
|
2610
|
+
|
|
1772
2611
|
/**
|
|
1773
2612
|
* tree node
|
|
1774
2613
|
*/
|
|
@@ -1780,6 +2619,36 @@ declare interface TreeNode {
|
|
|
1780
2619
|
[childrenKey]: Map<string, TreeNode>;
|
|
1781
2620
|
}
|
|
1782
2621
|
|
|
2622
|
+
/**
|
|
2623
|
+
* 树节点
|
|
2624
|
+
* @param id
|
|
2625
|
+
* @param data
|
|
2626
|
+
* @constructor
|
|
2627
|
+
*/
|
|
2628
|
+
declare class TreeNodeImpl implements TreeNode {
|
|
2629
|
+
/**
|
|
2630
|
+
* 自动创建解决策略
|
|
2631
|
+
*/
|
|
2632
|
+
[growKey]: boolean;
|
|
2633
|
+
/**
|
|
2634
|
+
* id
|
|
2635
|
+
*/
|
|
2636
|
+
[idKey]: string;
|
|
2637
|
+
/**
|
|
2638
|
+
* value
|
|
2639
|
+
*/
|
|
2640
|
+
[valueKey]: Ref<any>;
|
|
2641
|
+
/**
|
|
2642
|
+
* children
|
|
2643
|
+
*/
|
|
2644
|
+
[childrenKey]: Map<string, TreeNode>;
|
|
2645
|
+
/**
|
|
2646
|
+
* 构造函数
|
|
2647
|
+
* @param id
|
|
2648
|
+
*/
|
|
2649
|
+
constructor(id: string);
|
|
2650
|
+
}
|
|
2651
|
+
|
|
1783
2652
|
/**
|
|
1784
2653
|
* 判断类型
|
|
1785
2654
|
* @param obj
|
|
@@ -1810,7 +2679,7 @@ declare enum UpdateType {
|
|
|
1810
2679
|
* @param proxy
|
|
1811
2680
|
* @returns
|
|
1812
2681
|
*/
|
|
1813
|
-
export declare function useBus(proxy?: Proxy_2):
|
|
2682
|
+
export declare function useBus(proxy?: Proxy_2): BusInterface;
|
|
1814
2683
|
|
|
1815
2684
|
/**
|
|
1816
2685
|
* Returns the global event proxy
|