@fox-js/fox 3.1.1-3 → 3.1.1-30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/index.cjs.js +1 -3
- package/libs/index.esm.d.ts +978 -148
- package/libs/index.esm.js +2433 -4116
- package/libs/index.umd.js +1 -3
- package/libs/style.css +2 -1
- package/package.json +5 -5
package/libs/index.esm.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 {
|
|
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
|
|
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
|
-
|
|
132
|
+
declare type CustomTransition = 'custom';
|
|
132
133
|
|
|
133
134
|
/**
|
|
134
135
|
* 删除 context value
|
|
135
|
-
* @param
|
|
136
|
+
* @param contextRelationKey 上下文关联key
|
|
136
137
|
* @param key
|
|
137
138
|
*
|
|
138
139
|
*/
|
|
139
|
-
export declare function deleteContextValue(
|
|
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
|
|
|
@@ -338,7 +339,7 @@ export declare class EventProxy {
|
|
|
338
339
|
* @param callback
|
|
339
340
|
* @returns
|
|
340
341
|
*/
|
|
341
|
-
off(key: string, callback
|
|
342
|
+
off(key: string, callback?: Callback): EventProxy;
|
|
342
343
|
/**
|
|
343
344
|
* 绑定事件
|
|
344
345
|
* @param key
|
|
@@ -353,7 +354,7 @@ export declare class EventProxy {
|
|
|
353
354
|
* @param callback
|
|
354
355
|
* @returns
|
|
355
356
|
*/
|
|
356
|
-
unbind(key: string, callback
|
|
357
|
+
unbind(key: string, callback?: Callback): EventProxy;
|
|
357
358
|
/**
|
|
358
359
|
* 绑定一次性触发函数
|
|
359
360
|
* @param key
|
|
@@ -432,23 +433,18 @@ export declare interface Fox {
|
|
|
432
433
|
* 获取require
|
|
433
434
|
*/
|
|
434
435
|
get require(): Require;
|
|
435
|
-
/**
|
|
436
|
-
* 返回extend
|
|
437
|
-
*/
|
|
438
|
-
get extend(): Function;
|
|
439
|
-
/**
|
|
440
|
-
* 返回clone
|
|
441
|
-
*/
|
|
442
|
-
get clone(): Function;
|
|
443
436
|
/**
|
|
444
437
|
* 判断是否为es模块
|
|
445
438
|
*/
|
|
446
|
-
get isESModule():
|
|
439
|
+
get isESModule(): {
|
|
440
|
+
(mod: any): boolean;
|
|
441
|
+
};
|
|
447
442
|
/**
|
|
448
443
|
* 安装
|
|
449
444
|
* @param app
|
|
445
|
+
* @param options
|
|
450
446
|
*/
|
|
451
|
-
install(app: App): void;
|
|
447
|
+
install(app: App<Element>, options?: FoxInstallOptions): void;
|
|
452
448
|
}
|
|
453
449
|
|
|
454
450
|
/**
|
|
@@ -462,9 +458,10 @@ export declare const FoxBeforeEnter = "FoxBeforeEnter";
|
|
|
462
458
|
export declare const FoxBeforeLeave = "FoxLeave";
|
|
463
459
|
|
|
464
460
|
/**
|
|
465
|
-
*
|
|
461
|
+
* FoxContextRelationKey
|
|
462
|
+
* 上下文关联key
|
|
466
463
|
*/
|
|
467
|
-
|
|
464
|
+
declare type FoxContextRelationKey = Object;
|
|
468
465
|
|
|
469
466
|
/**
|
|
470
467
|
* Fox过渡进入事件
|
|
@@ -472,18 +469,13 @@ export declare const foxBusKey: FoxInjectionKey<BusInterface>;
|
|
|
472
469
|
export declare const FoxEnter = "FoxEnter";
|
|
473
470
|
|
|
474
471
|
/**
|
|
475
|
-
*
|
|
472
|
+
* Fox安装参数
|
|
476
473
|
*/
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
474
|
+
declare interface FoxInstallOptions {
|
|
475
|
+
install?: boolean;
|
|
476
|
+
optionsApi?: boolean;
|
|
480
477
|
}
|
|
481
478
|
|
|
482
|
-
/**
|
|
483
|
-
* 全局Fox
|
|
484
|
-
*/
|
|
485
|
-
export declare const foxKey: FoxInjectionKey<Fox>;
|
|
486
|
-
|
|
487
479
|
/**
|
|
488
480
|
* Fox过渡离开事件
|
|
489
481
|
*/
|
|
@@ -496,15 +488,15 @@ export declare const FoxLeave = "FoxLeave";
|
|
|
496
488
|
export declare const FoxLeaveEnd = "FoxLeaveEnd";
|
|
497
489
|
|
|
498
490
|
/**
|
|
499
|
-
* 参数
|
|
491
|
+
* Fox参数
|
|
500
492
|
*/
|
|
501
|
-
|
|
493
|
+
declare interface FoxOptions extends RouterOptions {
|
|
502
494
|
}
|
|
503
495
|
|
|
504
496
|
/**
|
|
505
497
|
* 通用函数接口
|
|
506
498
|
*/
|
|
507
|
-
|
|
499
|
+
declare interface GenericFunction {
|
|
508
500
|
(...args: any[]): any;
|
|
509
501
|
}
|
|
510
502
|
|
|
@@ -547,10 +539,17 @@ declare const initKey: unique symbol;
|
|
|
547
539
|
|
|
548
540
|
/**
|
|
549
541
|
* inject context value
|
|
550
|
-
* @param
|
|
542
|
+
* @param contextRelationKey 上下文关联key
|
|
543
|
+
* @param key
|
|
551
544
|
* @returns
|
|
552
545
|
*/
|
|
553
|
-
export declare function injectContextValue(
|
|
546
|
+
export declare function injectContextValue<T extends unknown>(contextRelationKey: FoxContextRelationKey | null, key: KeyType_2): T | null;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* inject Lifecycle context
|
|
550
|
+
* @param contextRelationKey 上下文关联key
|
|
551
|
+
*/
|
|
552
|
+
export declare function injectLifecycleContext(contextRelationKey?: FoxContextRelationKey | null): LifecycleContext | null;
|
|
554
553
|
|
|
555
554
|
/**
|
|
556
555
|
* 是否数组
|
|
@@ -598,10 +597,12 @@ export declare const isMap: (val: unknown) => val is Map<any, any>;
|
|
|
598
597
|
* @param val
|
|
599
598
|
* @returns
|
|
600
599
|
*/
|
|
601
|
-
export declare const isNil: (val: unknown) => val is null;
|
|
600
|
+
export declare const isNil: (val: unknown) => val is null | undefined;
|
|
602
601
|
|
|
603
602
|
/**
|
|
604
603
|
* 是否为object
|
|
604
|
+
* @param val
|
|
605
|
+
* @returns
|
|
605
606
|
*/
|
|
606
607
|
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
|
607
608
|
|
|
@@ -640,6 +641,9 @@ export declare const isString: (val: unknown) => val is string;
|
|
|
640
641
|
*/
|
|
641
642
|
export declare const isSymbol: (val: unknown) => val is symbol;
|
|
642
643
|
|
|
644
|
+
/**
|
|
645
|
+
* 数据类型key
|
|
646
|
+
*/
|
|
643
647
|
declare type KeyType_2 = string | number | Symbol;
|
|
644
648
|
|
|
645
649
|
/**
|
|
@@ -652,6 +656,44 @@ declare class Layer {
|
|
|
652
656
|
views: View[];
|
|
653
657
|
}
|
|
654
658
|
|
|
659
|
+
/**
|
|
660
|
+
* 生命周期上下文
|
|
661
|
+
*/
|
|
662
|
+
declare class LifecycleContext {
|
|
663
|
+
/**
|
|
664
|
+
* 数据列表
|
|
665
|
+
*/
|
|
666
|
+
private [registerKey_3];
|
|
667
|
+
/**
|
|
668
|
+
* 构造函数
|
|
669
|
+
*/
|
|
670
|
+
constructor();
|
|
671
|
+
/**
|
|
672
|
+
* 设置value
|
|
673
|
+
* @param key
|
|
674
|
+
* @param value
|
|
675
|
+
*/
|
|
676
|
+
set(key: KeyType_2, value: any): void;
|
|
677
|
+
/**
|
|
678
|
+
* 获取数据
|
|
679
|
+
* @param key
|
|
680
|
+
* @returns
|
|
681
|
+
*/
|
|
682
|
+
get(key: KeyType_2): any;
|
|
683
|
+
/**
|
|
684
|
+
* 是否有对应的数据
|
|
685
|
+
* @param key
|
|
686
|
+
* @returns
|
|
687
|
+
*/
|
|
688
|
+
has(key: KeyType_2): boolean;
|
|
689
|
+
/**
|
|
690
|
+
* 删除数据
|
|
691
|
+
* @param key
|
|
692
|
+
* @returns
|
|
693
|
+
*/
|
|
694
|
+
delete(key: KeyType_2): boolean;
|
|
695
|
+
}
|
|
696
|
+
|
|
655
697
|
declare const _load: unique symbol;
|
|
656
698
|
|
|
657
699
|
declare const mainDispatcherKey: unique symbol;
|
|
@@ -689,10 +731,6 @@ declare class Model {
|
|
|
689
731
|
props: Record<string | number | symbol, any> | boolean | {
|
|
690
732
|
(route: Route): any;
|
|
691
733
|
} | undefined;
|
|
692
|
-
/**
|
|
693
|
-
* 元数据
|
|
694
|
-
*/
|
|
695
|
-
meta?: Record<string | number | symbol, any>;
|
|
696
734
|
/**
|
|
697
735
|
* 原始组件数据
|
|
698
736
|
*/
|
|
@@ -707,11 +745,10 @@ declare class Model {
|
|
|
707
745
|
* @param name
|
|
708
746
|
* @param src
|
|
709
747
|
* @param props
|
|
710
|
-
* @param meta
|
|
711
748
|
*/
|
|
712
749
|
constructor(name: string, src: any, props?: Record<string | number | symbol, any> | {
|
|
713
750
|
(route: Route): any;
|
|
714
|
-
} | boolean
|
|
751
|
+
} | boolean);
|
|
715
752
|
/**
|
|
716
753
|
* 是否已经解析完成
|
|
717
754
|
*/
|
|
@@ -736,10 +773,6 @@ declare class ModelLayer {
|
|
|
736
773
|
* model插槽
|
|
737
774
|
*/
|
|
738
775
|
declare class ModelSlot {
|
|
739
|
-
/**
|
|
740
|
-
* 实例
|
|
741
|
-
*/
|
|
742
|
-
instance: ComponentInternalInstance | null;
|
|
743
776
|
/**
|
|
744
777
|
* model
|
|
745
778
|
*/
|
|
@@ -768,6 +801,8 @@ declare class ModelSlot {
|
|
|
768
801
|
|
|
769
802
|
declare const nameKey: unique symbol;
|
|
770
803
|
|
|
804
|
+
declare const normalizeRoute: unique symbol;
|
|
805
|
+
|
|
771
806
|
declare const notFoundKey: unique symbol;
|
|
772
807
|
|
|
773
808
|
declare const notFoundPathKey: unique symbol;
|
|
@@ -788,8 +823,14 @@ export declare function onBeforeRouteUpdate(callback: {
|
|
|
788
823
|
(to: Route, from?: Route): void;
|
|
789
824
|
}): void;
|
|
790
825
|
|
|
826
|
+
/**
|
|
827
|
+
* 导出注册Fox Activated方法
|
|
828
|
+
*/
|
|
791
829
|
export declare const onFoxActivated: (hook: GenericFunction) => void;
|
|
792
830
|
|
|
831
|
+
/**
|
|
832
|
+
* 导出注册Fox Inactivated方法
|
|
833
|
+
*/
|
|
793
834
|
export declare const onFoxInactivated: (hook: GenericFunction) => void;
|
|
794
835
|
|
|
795
836
|
/**
|
|
@@ -834,19 +875,23 @@ declare const parentNodeKey: unique symbol;
|
|
|
834
875
|
declare const persistentModeKey: unique symbol;
|
|
835
876
|
|
|
836
877
|
/**
|
|
837
|
-
*
|
|
878
|
+
* 持久化参数
|
|
838
879
|
*/
|
|
839
|
-
declare type
|
|
880
|
+
declare type PersistOptions = {
|
|
881
|
+
name?: string;
|
|
882
|
+
persistPolicy?: PersistPolicy;
|
|
883
|
+
storage?: Storage_2;
|
|
884
|
+
};
|
|
840
885
|
|
|
841
886
|
/**
|
|
842
887
|
* 持久化策略
|
|
843
888
|
*/
|
|
844
|
-
declare type
|
|
889
|
+
declare type PersistPolicy = 'memory' | 'session' | 'local' | 'custom';
|
|
845
890
|
|
|
846
891
|
/**
|
|
847
892
|
* 属性函数
|
|
848
893
|
*/
|
|
849
|
-
|
|
894
|
+
declare type PropFunction = {
|
|
850
895
|
(route: Route, index: number): any;
|
|
851
896
|
};
|
|
852
897
|
|
|
@@ -861,13 +906,11 @@ declare const propsFilterKey: unique symbol;
|
|
|
861
906
|
|
|
862
907
|
/**
|
|
863
908
|
* provide context value
|
|
864
|
-
* @param
|
|
909
|
+
* @param contextRelationKey 上下文关联key
|
|
865
910
|
* @param key
|
|
866
911
|
* @param value
|
|
867
912
|
*/
|
|
868
|
-
export declare function provideContextValue(
|
|
869
|
-
|
|
870
|
-
declare type Proxy_2 = ComponentPublicInstance | null;
|
|
913
|
+
export declare function provideContextValue(contextRelationKey: FoxContextRelationKey | null, key: KeyType_2, value: any): void;
|
|
871
914
|
|
|
872
915
|
/**
|
|
873
916
|
* raw state
|
|
@@ -875,7 +918,7 @@ declare type Proxy_2 = ComponentPublicInstance | null;
|
|
|
875
918
|
* @param options
|
|
876
919
|
* @returns
|
|
877
920
|
*/
|
|
878
|
-
export declare function rawState<T extends Record<string, any>>(state: T, options?:
|
|
921
|
+
export declare function rawState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
879
922
|
|
|
880
923
|
/**
|
|
881
924
|
* reactive state
|
|
@@ -883,7 +926,7 @@ export declare function rawState<T extends Record<string, any>>(state: T, option
|
|
|
883
926
|
* @param options
|
|
884
927
|
* @returns
|
|
885
928
|
*/
|
|
886
|
-
export declare function reactiveState<T extends Record<string, any>>(state: T, options?:
|
|
929
|
+
export declare function reactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
887
930
|
|
|
888
931
|
declare const readyHandlersKey: unique symbol;
|
|
889
932
|
|
|
@@ -893,13 +936,220 @@ declare const registerKey: unique symbol;
|
|
|
893
936
|
|
|
894
937
|
declare const registerKey_2: unique symbol;
|
|
895
938
|
|
|
939
|
+
/**
|
|
940
|
+
* 注册表key
|
|
941
|
+
*/
|
|
942
|
+
declare const registerKey_3: unique symbol;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* remove route 条件
|
|
946
|
+
*/
|
|
947
|
+
declare interface RemoveRouteCondition {
|
|
948
|
+
all?: boolean;
|
|
949
|
+
until?: string;
|
|
950
|
+
to?: string;
|
|
951
|
+
root?: string;
|
|
952
|
+
}
|
|
953
|
+
|
|
896
954
|
declare const _removeRouteRecorder: unique symbol;
|
|
897
955
|
|
|
898
956
|
declare const _removeView: unique symbol;
|
|
899
957
|
|
|
900
|
-
|
|
958
|
+
/**
|
|
959
|
+
* 依赖加载器
|
|
960
|
+
* 支持js(amd、esm格式) 和 css
|
|
961
|
+
*/
|
|
962
|
+
declare class Require {
|
|
963
|
+
/**
|
|
964
|
+
* module manager
|
|
965
|
+
*/
|
|
966
|
+
private moduleManager;
|
|
967
|
+
/**
|
|
968
|
+
* 路径别名
|
|
969
|
+
*/
|
|
970
|
+
private _alias;
|
|
971
|
+
set alias(alias: Record<string, string>);
|
|
972
|
+
get alias(): Record<string, string>;
|
|
973
|
+
private _resourceParser?;
|
|
974
|
+
set resourceParser(parser: RequireResourceParser);
|
|
975
|
+
get resourceParser(): RequireResourceParser | undefined;
|
|
976
|
+
/**
|
|
977
|
+
* 设置超时时间
|
|
978
|
+
*/
|
|
979
|
+
private _timeout?;
|
|
980
|
+
set timeout(time: number);
|
|
981
|
+
get timeout(): number | undefined;
|
|
982
|
+
/**
|
|
983
|
+
* 设置query
|
|
984
|
+
*/
|
|
985
|
+
private _query?;
|
|
986
|
+
set query(val: Record<string, string>);
|
|
987
|
+
get query(): Record<string, string> | undefined;
|
|
988
|
+
/**
|
|
989
|
+
* 获取document head
|
|
990
|
+
*/
|
|
991
|
+
get head(): any;
|
|
992
|
+
/**
|
|
993
|
+
* css挂载点
|
|
994
|
+
*/
|
|
995
|
+
private _cssMountPoint;
|
|
996
|
+
set cssMountPoint(point: any);
|
|
997
|
+
get cssMountPoint(): any;
|
|
998
|
+
/**
|
|
999
|
+
* js挂载点
|
|
1000
|
+
*/
|
|
1001
|
+
private _jsMountPoint;
|
|
1002
|
+
set jsMountPoint(point: any);
|
|
1003
|
+
get jsMountPoint(): any;
|
|
1004
|
+
/**
|
|
1005
|
+
* 设置module
|
|
1006
|
+
* @param id
|
|
1007
|
+
* @param exports
|
|
1008
|
+
*/
|
|
1009
|
+
setModule(id: string | RegExp, exports: any | {
|
|
1010
|
+
(): any;
|
|
1011
|
+
}): void;
|
|
1012
|
+
/**
|
|
1013
|
+
* 移除module
|
|
1014
|
+
* @param id
|
|
1015
|
+
*/
|
|
1016
|
+
removeModule(id: string | RegExp): void;
|
|
1017
|
+
/**
|
|
1018
|
+
* 获取module exports
|
|
1019
|
+
* @param id
|
|
1020
|
+
* @returns
|
|
1021
|
+
*/
|
|
1022
|
+
getModuleExports(id: string): any;
|
|
1023
|
+
/**
|
|
1024
|
+
* expose require方法
|
|
1025
|
+
* @param name
|
|
1026
|
+
* @param global
|
|
1027
|
+
* @param debug
|
|
1028
|
+
* @returns
|
|
1029
|
+
*/
|
|
1030
|
+
exposeRequire(name?: string, global?: any, debug?: boolean): boolean;
|
|
1031
|
+
/**
|
|
1032
|
+
* reslove resource
|
|
1033
|
+
*/
|
|
1034
|
+
private resloveResource;
|
|
1035
|
+
/**
|
|
1036
|
+
* 加载
|
|
1037
|
+
* @params args
|
|
1038
|
+
*/
|
|
1039
|
+
ensure(...args: [...any[]] | [...any[], RequireMountedCallback]): Promise<any[]>;
|
|
1040
|
+
/**
|
|
1041
|
+
* 卸载
|
|
1042
|
+
*/
|
|
1043
|
+
remove(...args: [...any[]] | [...any[], RequireUnMountedCallback]): Promise<boolean>;
|
|
1044
|
+
/**
|
|
1045
|
+
* 加载
|
|
1046
|
+
*
|
|
1047
|
+
* @param chain
|
|
1048
|
+
* @param taskNode
|
|
1049
|
+
*/
|
|
1050
|
+
private mount;
|
|
1051
|
+
/**
|
|
1052
|
+
* 加载css
|
|
1053
|
+
* @param chain
|
|
1054
|
+
* @param task
|
|
1055
|
+
* @param point
|
|
1056
|
+
*/
|
|
1057
|
+
private mountCSS;
|
|
1058
|
+
/**
|
|
1059
|
+
* 加载js
|
|
1060
|
+
*
|
|
1061
|
+
* @param chain
|
|
1062
|
+
* @param task
|
|
1063
|
+
* @param point
|
|
1064
|
+
*/
|
|
1065
|
+
private mountJS;
|
|
1066
|
+
/**
|
|
1067
|
+
* 加载cjs
|
|
1068
|
+
*
|
|
1069
|
+
* @param chain
|
|
1070
|
+
* @param task
|
|
1071
|
+
*/
|
|
1072
|
+
private mountCJS;
|
|
1073
|
+
/**
|
|
1074
|
+
* 卸载资源
|
|
1075
|
+
*/
|
|
1076
|
+
private unmount;
|
|
1077
|
+
/**
|
|
1078
|
+
* 去掉空元素
|
|
1079
|
+
*/
|
|
1080
|
+
private trimEmptyElement;
|
|
1081
|
+
/**
|
|
1082
|
+
* 创建define函数
|
|
1083
|
+
* @param module
|
|
1084
|
+
* @param requireLoad
|
|
1085
|
+
* @param task
|
|
1086
|
+
* @returns
|
|
1087
|
+
*/
|
|
1088
|
+
private createDefine;
|
|
1089
|
+
/**
|
|
1090
|
+
* 创建require 加载函数
|
|
1091
|
+
* @returns
|
|
1092
|
+
*/
|
|
1093
|
+
private createRequireLoad;
|
|
1094
|
+
/**
|
|
1095
|
+
* 构建资源uri
|
|
1096
|
+
* @param uri
|
|
1097
|
+
* @returns
|
|
1098
|
+
*/
|
|
1099
|
+
private constructResourceUri;
|
|
1100
|
+
/**
|
|
1101
|
+
* 创建search字符串
|
|
1102
|
+
*/
|
|
1103
|
+
private createSearch;
|
|
1104
|
+
/**
|
|
1105
|
+
* 获取资源路径的后缀
|
|
1106
|
+
* @param name
|
|
1107
|
+
* @returns
|
|
1108
|
+
*/
|
|
1109
|
+
private getResourcePathSuffix;
|
|
1110
|
+
}
|
|
901
1111
|
|
|
902
|
-
|
|
1112
|
+
/**
|
|
1113
|
+
* require mount callback
|
|
1114
|
+
*/
|
|
1115
|
+
declare interface RequireMountedCallback {
|
|
1116
|
+
(ret: boolean): void;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* 资源
|
|
1121
|
+
*/
|
|
1122
|
+
declare interface RequireResource {
|
|
1123
|
+
path: string;
|
|
1124
|
+
type?: RequireResourceType;
|
|
1125
|
+
format?: RequireResourceFormat;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* 资源类型
|
|
1130
|
+
*/
|
|
1131
|
+
declare type RequireResourceFormat = 'es' | 'umd';
|
|
1132
|
+
|
|
1133
|
+
/**
|
|
1134
|
+
* 资源解析
|
|
1135
|
+
*/
|
|
1136
|
+
declare interface RequireResourceParser {
|
|
1137
|
+
(path: string): RequireResource | null;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* 资源类型
|
|
1142
|
+
*/
|
|
1143
|
+
declare type RequireResourceType = 'js' | 'css';
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* require unmount callback
|
|
1147
|
+
*/
|
|
1148
|
+
declare interface RequireUnMountedCallback {
|
|
1149
|
+
(): void;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
declare const _resolveComponent: unique symbol;
|
|
903
1153
|
|
|
904
1154
|
declare const rootKey: unique symbol;
|
|
905
1155
|
|
|
@@ -948,9 +1198,7 @@ export declare class Route {
|
|
|
948
1198
|
/**
|
|
949
1199
|
* 获取匹配的元数组列表
|
|
950
1200
|
*/
|
|
951
|
-
matched?:
|
|
952
|
-
meta: Record<string | number | symbol, any>;
|
|
953
|
-
}[];
|
|
1201
|
+
matched?: Array<Route>;
|
|
954
1202
|
/**
|
|
955
1203
|
* route本身的元数据
|
|
956
1204
|
*/
|
|
@@ -1001,10 +1249,6 @@ export declare class Route {
|
|
|
1001
1249
|
* 插槽(用于历史还原)
|
|
1002
1250
|
*/
|
|
1003
1251
|
slot?: Slot;
|
|
1004
|
-
/**
|
|
1005
|
-
* session(router执行链路session)
|
|
1006
|
-
*/
|
|
1007
|
-
session?: Session;
|
|
1008
1252
|
/**
|
|
1009
1253
|
* 克隆
|
|
1010
1254
|
* @param target
|
|
@@ -1019,12 +1263,13 @@ export declare class Route {
|
|
|
1019
1263
|
*/
|
|
1020
1264
|
static isSame(x: Route, y: Route): boolean;
|
|
1021
1265
|
/**
|
|
1022
|
-
*
|
|
1266
|
+
* 判断路由路径是一致
|
|
1267
|
+
* route.name 一致 or route.path一致
|
|
1023
1268
|
* @param x
|
|
1024
1269
|
* @param y
|
|
1025
1270
|
* @returns
|
|
1026
1271
|
*/
|
|
1027
|
-
static
|
|
1272
|
+
static isSamePathForRoute(x: Route | null, y: Route | null): boolean;
|
|
1028
1273
|
/**
|
|
1029
1274
|
* 由对象生成路由
|
|
1030
1275
|
* @param obj
|
|
@@ -1095,6 +1340,14 @@ declare class RouteModel {
|
|
|
1095
1340
|
* 名称
|
|
1096
1341
|
*/
|
|
1097
1342
|
name?: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* 元数据
|
|
1345
|
+
*/
|
|
1346
|
+
meta?: Record<string | number | symbol, any>;
|
|
1347
|
+
/**
|
|
1348
|
+
* matched routes 当前路由及其所有父路由的匹配记录
|
|
1349
|
+
*/
|
|
1350
|
+
matchedRoutes?: Array<Route>;
|
|
1098
1351
|
/**
|
|
1099
1352
|
* layer集合
|
|
1100
1353
|
*/
|
|
@@ -1134,6 +1387,14 @@ export declare class Router {
|
|
|
1134
1387
|
* 当前路由集合
|
|
1135
1388
|
*/
|
|
1136
1389
|
private [currentRoutes];
|
|
1390
|
+
/**
|
|
1391
|
+
* 当前路由
|
|
1392
|
+
*/
|
|
1393
|
+
private [currentRoute];
|
|
1394
|
+
/**
|
|
1395
|
+
* route sessin key
|
|
1396
|
+
*/
|
|
1397
|
+
private [routeSessionCacheKey];
|
|
1137
1398
|
/**
|
|
1138
1399
|
* 错误回调
|
|
1139
1400
|
*/
|
|
@@ -1170,14 +1431,174 @@ export declare class Router {
|
|
|
1170
1431
|
* 是否初始化
|
|
1171
1432
|
*/
|
|
1172
1433
|
private [initKey];
|
|
1173
|
-
/**
|
|
1174
|
-
* 当前最新路由
|
|
1175
|
-
*/
|
|
1176
|
-
private [currentKey];
|
|
1177
1434
|
/**
|
|
1178
1435
|
* 获取当前最新route
|
|
1179
1436
|
*/
|
|
1180
|
-
get
|
|
1437
|
+
get currentRoute(): Readonly<Ref< {
|
|
1438
|
+
readonly path?: string | undefined;
|
|
1439
|
+
readonly fullPath?: string | undefined;
|
|
1440
|
+
readonly alias?: string | undefined;
|
|
1441
|
+
readonly name?: string | undefined;
|
|
1442
|
+
readonly root?: string | undefined;
|
|
1443
|
+
readonly params?: {
|
|
1444
|
+
readonly [x: string]: any;
|
|
1445
|
+
readonly [x: number]: any;
|
|
1446
|
+
readonly [x: symbol]: any;
|
|
1447
|
+
} | undefined;
|
|
1448
|
+
readonly query?: any;
|
|
1449
|
+
readonly traceless?: boolean | undefined;
|
|
1450
|
+
readonly template?: string | undefined;
|
|
1451
|
+
readonly matched?: readonly {
|
|
1452
|
+
readonly path?: string | undefined;
|
|
1453
|
+
readonly fullPath: string;
|
|
1454
|
+
readonly alias?: string | undefined;
|
|
1455
|
+
readonly name?: string | undefined;
|
|
1456
|
+
readonly root?: string | undefined;
|
|
1457
|
+
readonly params?: {
|
|
1458
|
+
readonly [x: string]: any;
|
|
1459
|
+
readonly [x: number]: any;
|
|
1460
|
+
readonly [x: symbol]: any;
|
|
1461
|
+
} | undefined;
|
|
1462
|
+
readonly query?: any;
|
|
1463
|
+
readonly traceless?: boolean | undefined;
|
|
1464
|
+
readonly template?: string | undefined;
|
|
1465
|
+
readonly matched?: readonly /*elided*/ any[] | undefined;
|
|
1466
|
+
readonly meta?: {
|
|
1467
|
+
readonly [x: string]: any;
|
|
1468
|
+
readonly [x: number]: any;
|
|
1469
|
+
readonly [x: symbol]: any;
|
|
1470
|
+
} | undefined;
|
|
1471
|
+
readonly success?: {
|
|
1472
|
+
(...arg: any[]): void;
|
|
1473
|
+
} | undefined;
|
|
1474
|
+
readonly error?: {
|
|
1475
|
+
(...arg: any[]): void;
|
|
1476
|
+
} | undefined;
|
|
1477
|
+
readonly destroy?: {
|
|
1478
|
+
(...arg: any[]): void;
|
|
1479
|
+
} | undefined;
|
|
1480
|
+
readonly opsType?: OperationType | undefined;
|
|
1481
|
+
readonly updateType?: UpdateType | undefined;
|
|
1482
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1483
|
+
readonly viewTagAttrs?: any;
|
|
1484
|
+
readonly index?: number | undefined;
|
|
1485
|
+
readonly active?: boolean | undefined;
|
|
1486
|
+
readonly slot?: {
|
|
1487
|
+
readonly name: string;
|
|
1488
|
+
readonly level: number;
|
|
1489
|
+
readonly rootName: string | undefined;
|
|
1490
|
+
readonly rootIndex: number;
|
|
1491
|
+
} | undefined;
|
|
1492
|
+
}[] | undefined;
|
|
1493
|
+
readonly meta?: {
|
|
1494
|
+
readonly [x: string]: any;
|
|
1495
|
+
readonly [x: number]: any;
|
|
1496
|
+
readonly [x: symbol]: any;
|
|
1497
|
+
} | undefined;
|
|
1498
|
+
readonly success?: {
|
|
1499
|
+
(...arg: any[]): void;
|
|
1500
|
+
} | undefined;
|
|
1501
|
+
readonly error?: {
|
|
1502
|
+
(...arg: any[]): void;
|
|
1503
|
+
} | undefined;
|
|
1504
|
+
readonly destroy?: {
|
|
1505
|
+
(...arg: any[]): void;
|
|
1506
|
+
} | undefined;
|
|
1507
|
+
readonly opsType?: OperationType | undefined;
|
|
1508
|
+
readonly updateType?: UpdateType | undefined;
|
|
1509
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1510
|
+
readonly viewTagAttrs?: any;
|
|
1511
|
+
readonly index?: number | undefined;
|
|
1512
|
+
readonly active?: boolean | undefined;
|
|
1513
|
+
readonly slot?: {
|
|
1514
|
+
readonly name: string;
|
|
1515
|
+
readonly level: number;
|
|
1516
|
+
readonly rootName: string | undefined;
|
|
1517
|
+
readonly rootIndex: number;
|
|
1518
|
+
} | undefined;
|
|
1519
|
+
} | null, {
|
|
1520
|
+
readonly path?: string | undefined;
|
|
1521
|
+
readonly fullPath?: string | undefined;
|
|
1522
|
+
readonly alias?: string | undefined;
|
|
1523
|
+
readonly name?: string | undefined;
|
|
1524
|
+
readonly root?: string | undefined;
|
|
1525
|
+
readonly params?: {
|
|
1526
|
+
readonly [x: string]: any;
|
|
1527
|
+
readonly [x: number]: any;
|
|
1528
|
+
readonly [x: symbol]: any;
|
|
1529
|
+
} | undefined;
|
|
1530
|
+
readonly query?: any;
|
|
1531
|
+
readonly traceless?: boolean | undefined;
|
|
1532
|
+
readonly template?: string | undefined;
|
|
1533
|
+
readonly matched?: readonly {
|
|
1534
|
+
readonly path?: string | undefined;
|
|
1535
|
+
readonly fullPath: string;
|
|
1536
|
+
readonly alias?: string | undefined;
|
|
1537
|
+
readonly name?: string | undefined;
|
|
1538
|
+
readonly root?: string | undefined;
|
|
1539
|
+
readonly params?: {
|
|
1540
|
+
readonly [x: string]: any;
|
|
1541
|
+
readonly [x: number]: any;
|
|
1542
|
+
readonly [x: symbol]: any;
|
|
1543
|
+
} | undefined;
|
|
1544
|
+
readonly query?: any;
|
|
1545
|
+
readonly traceless?: boolean | undefined;
|
|
1546
|
+
readonly template?: string | undefined;
|
|
1547
|
+
readonly matched?: readonly /*elided*/ any[] | undefined;
|
|
1548
|
+
readonly meta?: {
|
|
1549
|
+
readonly [x: string]: any;
|
|
1550
|
+
readonly [x: number]: any;
|
|
1551
|
+
readonly [x: symbol]: any;
|
|
1552
|
+
} | undefined;
|
|
1553
|
+
readonly success?: {
|
|
1554
|
+
(...arg: any[]): void;
|
|
1555
|
+
} | undefined;
|
|
1556
|
+
readonly error?: {
|
|
1557
|
+
(...arg: any[]): void;
|
|
1558
|
+
} | undefined;
|
|
1559
|
+
readonly destroy?: {
|
|
1560
|
+
(...arg: any[]): void;
|
|
1561
|
+
} | undefined;
|
|
1562
|
+
readonly opsType?: OperationType | undefined;
|
|
1563
|
+
readonly updateType?: UpdateType | undefined;
|
|
1564
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1565
|
+
readonly viewTagAttrs?: any;
|
|
1566
|
+
readonly index?: number | undefined;
|
|
1567
|
+
readonly active?: boolean | undefined;
|
|
1568
|
+
readonly slot?: {
|
|
1569
|
+
readonly name: string;
|
|
1570
|
+
readonly level: number;
|
|
1571
|
+
readonly rootName: string | undefined;
|
|
1572
|
+
readonly rootIndex: number;
|
|
1573
|
+
} | undefined;
|
|
1574
|
+
}[] | undefined;
|
|
1575
|
+
readonly meta?: {
|
|
1576
|
+
readonly [x: string]: any;
|
|
1577
|
+
readonly [x: number]: any;
|
|
1578
|
+
readonly [x: symbol]: any;
|
|
1579
|
+
} | undefined;
|
|
1580
|
+
readonly success?: {
|
|
1581
|
+
(...arg: any[]): void;
|
|
1582
|
+
} | undefined;
|
|
1583
|
+
readonly error?: {
|
|
1584
|
+
(...arg: any[]): void;
|
|
1585
|
+
} | undefined;
|
|
1586
|
+
readonly destroy?: {
|
|
1587
|
+
(...arg: any[]): void;
|
|
1588
|
+
} | undefined;
|
|
1589
|
+
readonly opsType?: OperationType | undefined;
|
|
1590
|
+
readonly updateType?: UpdateType | undefined;
|
|
1591
|
+
readonly historyUpdatePolicy?: HistoryUpdatePolicy | undefined;
|
|
1592
|
+
readonly viewTagAttrs?: any;
|
|
1593
|
+
readonly index?: number | undefined;
|
|
1594
|
+
readonly active?: boolean | undefined;
|
|
1595
|
+
readonly slot?: {
|
|
1596
|
+
readonly name: string;
|
|
1597
|
+
readonly level: number;
|
|
1598
|
+
readonly rootName: string | undefined;
|
|
1599
|
+
readonly rootIndex: number;
|
|
1600
|
+
} | undefined;
|
|
1601
|
+
} | null>>;
|
|
1181
1602
|
private options;
|
|
1182
1603
|
/**
|
|
1183
1604
|
* 构造函数
|
|
@@ -1363,11 +1784,11 @@ export declare class Router {
|
|
|
1363
1784
|
*/
|
|
1364
1785
|
private [_findRouteModel];
|
|
1365
1786
|
/**
|
|
1366
|
-
*
|
|
1787
|
+
* 解析并格式化路由
|
|
1367
1788
|
* @param args
|
|
1368
1789
|
* @returns
|
|
1369
1790
|
*/
|
|
1370
|
-
[
|
|
1791
|
+
[normalizeRoute](args: any): Route | null;
|
|
1371
1792
|
/**
|
|
1372
1793
|
* 路由跳转(operation类型为Push)
|
|
1373
1794
|
* @param args
|
|
@@ -1393,7 +1814,7 @@ export declare class Router {
|
|
|
1393
1814
|
* @param term
|
|
1394
1815
|
* @param changeHistory
|
|
1395
1816
|
*/
|
|
1396
|
-
remove(term?:
|
|
1817
|
+
remove(term?: RemoveRouteCondition, changeHistory?: boolean): Promise<boolean>;
|
|
1397
1818
|
/**
|
|
1398
1819
|
* 路由跳转(operation类型为Open)
|
|
1399
1820
|
* @param args
|
|
@@ -1600,6 +2021,82 @@ declare interface RouterHistory {
|
|
|
1600
2021
|
setRestorePoint(routes?: Array<Route>): void;
|
|
1601
2022
|
}
|
|
1602
2023
|
|
|
2024
|
+
/**
|
|
2025
|
+
* router link
|
|
2026
|
+
*/
|
|
2027
|
+
export declare let RouterLink: DefineComponent<ExtractPropTypes< {
|
|
2028
|
+
tag: {
|
|
2029
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
2030
|
+
required: false;
|
|
2031
|
+
default: string;
|
|
2032
|
+
};
|
|
2033
|
+
to: {
|
|
2034
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
2035
|
+
required: true;
|
|
2036
|
+
};
|
|
2037
|
+
root: {
|
|
2038
|
+
type: PropType<string>;
|
|
2039
|
+
};
|
|
2040
|
+
activeClass: {
|
|
2041
|
+
type: PropType<string | GenericFunction>;
|
|
2042
|
+
required: false;
|
|
2043
|
+
default: string;
|
|
2044
|
+
};
|
|
2045
|
+
exact: {
|
|
2046
|
+
type: PropType<string | boolean | GenericFunction>;
|
|
2047
|
+
required: false;
|
|
2048
|
+
};
|
|
2049
|
+
exactActiveClass: {
|
|
2050
|
+
type: PropType<string | GenericFunction>;
|
|
2051
|
+
required: false;
|
|
2052
|
+
default: string;
|
|
2053
|
+
};
|
|
2054
|
+
event: {
|
|
2055
|
+
type: PropType<string | GenericFunction>;
|
|
2056
|
+
required: false;
|
|
2057
|
+
default: string;
|
|
2058
|
+
};
|
|
2059
|
+
}>, () => VNode<RendererNode, RendererElement, {
|
|
2060
|
+
[key: string]: any;
|
|
2061
|
+
}> | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2062
|
+
tag: {
|
|
2063
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
2064
|
+
required: false;
|
|
2065
|
+
default: string;
|
|
2066
|
+
};
|
|
2067
|
+
to: {
|
|
2068
|
+
type: PropType<string | unknown | GenericFunction>;
|
|
2069
|
+
required: true;
|
|
2070
|
+
};
|
|
2071
|
+
root: {
|
|
2072
|
+
type: PropType<string>;
|
|
2073
|
+
};
|
|
2074
|
+
activeClass: {
|
|
2075
|
+
type: PropType<string | GenericFunction>;
|
|
2076
|
+
required: false;
|
|
2077
|
+
default: string;
|
|
2078
|
+
};
|
|
2079
|
+
exact: {
|
|
2080
|
+
type: PropType<string | boolean | GenericFunction>;
|
|
2081
|
+
required: false;
|
|
2082
|
+
};
|
|
2083
|
+
exactActiveClass: {
|
|
2084
|
+
type: PropType<string | GenericFunction>;
|
|
2085
|
+
required: false;
|
|
2086
|
+
default: string;
|
|
2087
|
+
};
|
|
2088
|
+
event: {
|
|
2089
|
+
type: PropType<string | GenericFunction>;
|
|
2090
|
+
required: false;
|
|
2091
|
+
default: string;
|
|
2092
|
+
};
|
|
2093
|
+
}>> & Readonly<{}>, {
|
|
2094
|
+
tag: string;
|
|
2095
|
+
activeClass: string | GenericFunction;
|
|
2096
|
+
exactActiveClass: string | GenericFunction;
|
|
2097
|
+
event: string | GenericFunction;
|
|
2098
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2099
|
+
|
|
1603
2100
|
/**
|
|
1604
2101
|
* router options
|
|
1605
2102
|
*/
|
|
@@ -1632,44 +2129,371 @@ export declare interface RouterOptions {
|
|
|
1632
2129
|
notFoundPath?: string;
|
|
1633
2130
|
}
|
|
1634
2131
|
|
|
1635
|
-
|
|
2132
|
+
/**
|
|
2133
|
+
* router view
|
|
2134
|
+
*/
|
|
2135
|
+
export declare const RouterView: DefineComponent<ExtractPropTypes< {
|
|
2136
|
+
name: {
|
|
2137
|
+
type: PropType<string>;
|
|
2138
|
+
required: false;
|
|
2139
|
+
default: string;
|
|
2140
|
+
};
|
|
2141
|
+
modelSlot: {
|
|
2142
|
+
type: PropType<ModelSlot>;
|
|
2143
|
+
required: false;
|
|
2144
|
+
};
|
|
2145
|
+
multi: {
|
|
2146
|
+
type: PropType<boolean>;
|
|
2147
|
+
required: false;
|
|
2148
|
+
default: boolean;
|
|
2149
|
+
};
|
|
2150
|
+
tag: {
|
|
2151
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2152
|
+
required: false;
|
|
2153
|
+
default: string;
|
|
2154
|
+
};
|
|
2155
|
+
viewTag: {
|
|
2156
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2157
|
+
required: false;
|
|
2158
|
+
default: string;
|
|
2159
|
+
};
|
|
2160
|
+
viewTagProps: {
|
|
2161
|
+
type: PropType<unknown | PropFunction>;
|
|
2162
|
+
required: false;
|
|
2163
|
+
default(): {};
|
|
2164
|
+
};
|
|
2165
|
+
viewClass: {
|
|
2166
|
+
type: PropType<string | PropFunction>;
|
|
2167
|
+
required: false;
|
|
2168
|
+
};
|
|
2169
|
+
viewActiveClass: {
|
|
2170
|
+
type: PropType<string | PropFunction>;
|
|
2171
|
+
required: false;
|
|
2172
|
+
};
|
|
2173
|
+
viewInactiveClass: {
|
|
2174
|
+
type: PropType<string | PropFunction>;
|
|
2175
|
+
required: false;
|
|
2176
|
+
};
|
|
2177
|
+
transition: {
|
|
2178
|
+
type: PropType<TransitionProp>;
|
|
2179
|
+
required: false;
|
|
2180
|
+
default: boolean;
|
|
2181
|
+
};
|
|
2182
|
+
transitionName: {
|
|
2183
|
+
type: PropType<string>;
|
|
2184
|
+
required: false;
|
|
2185
|
+
};
|
|
2186
|
+
transitionDuration: {
|
|
2187
|
+
type: PropType<string | number | {
|
|
2188
|
+
enter: number;
|
|
2189
|
+
leave: number;
|
|
2190
|
+
show: number;
|
|
2191
|
+
hide: number;
|
|
2192
|
+
}>;
|
|
2193
|
+
required: false;
|
|
2194
|
+
};
|
|
2195
|
+
enterFromClass: {
|
|
2196
|
+
type: PropType<string>;
|
|
2197
|
+
required: false;
|
|
2198
|
+
};
|
|
2199
|
+
enterActiveClass: {
|
|
2200
|
+
type: PropType<string>;
|
|
2201
|
+
required: false;
|
|
2202
|
+
};
|
|
2203
|
+
enterToClass: {
|
|
2204
|
+
type: PropType<string>;
|
|
2205
|
+
required: false;
|
|
2206
|
+
};
|
|
2207
|
+
leaveFromClass: {
|
|
2208
|
+
type: PropType<string>;
|
|
2209
|
+
required: false;
|
|
2210
|
+
};
|
|
2211
|
+
leaveActiveClass: {
|
|
2212
|
+
type: PropType<string>;
|
|
2213
|
+
required: false;
|
|
2214
|
+
};
|
|
2215
|
+
leaveToClass: {
|
|
2216
|
+
type: PropType<string>;
|
|
2217
|
+
required: false;
|
|
2218
|
+
};
|
|
2219
|
+
showFromClass: {
|
|
2220
|
+
type: PropType<string>;
|
|
2221
|
+
required: false;
|
|
2222
|
+
};
|
|
2223
|
+
showActiveClass: {
|
|
2224
|
+
type: PropType<string>;
|
|
2225
|
+
required: false;
|
|
2226
|
+
};
|
|
2227
|
+
showToClass: {
|
|
2228
|
+
type: PropType<string>;
|
|
2229
|
+
required: false;
|
|
2230
|
+
};
|
|
2231
|
+
hideFromClass: {
|
|
2232
|
+
type: PropType<string>;
|
|
2233
|
+
required: false;
|
|
2234
|
+
};
|
|
2235
|
+
hideActiveClass: {
|
|
2236
|
+
type: PropType<string>;
|
|
2237
|
+
required: false;
|
|
2238
|
+
};
|
|
2239
|
+
hideToClass: {
|
|
2240
|
+
type: PropType<string>;
|
|
2241
|
+
required: false;
|
|
2242
|
+
};
|
|
2243
|
+
beforeEnter: {
|
|
2244
|
+
type: PropType<PropFunction>;
|
|
2245
|
+
required: false;
|
|
2246
|
+
};
|
|
2247
|
+
enter: {
|
|
2248
|
+
type: PropType<PropFunction>;
|
|
2249
|
+
required: false;
|
|
2250
|
+
};
|
|
2251
|
+
afterEnter: {
|
|
2252
|
+
type: PropType<PropFunction>;
|
|
2253
|
+
required: false;
|
|
2254
|
+
};
|
|
2255
|
+
enterCancelled: {
|
|
2256
|
+
type: PropType<PropFunction>;
|
|
2257
|
+
required: false;
|
|
2258
|
+
};
|
|
2259
|
+
beforeLeave: {
|
|
2260
|
+
type: PropType<PropFunction>;
|
|
2261
|
+
required: false;
|
|
2262
|
+
};
|
|
2263
|
+
leave: {
|
|
2264
|
+
type: PropType<PropFunction>;
|
|
2265
|
+
required: false;
|
|
2266
|
+
};
|
|
2267
|
+
afterLeave: {
|
|
2268
|
+
type: PropType<PropFunction>;
|
|
2269
|
+
required: false;
|
|
2270
|
+
};
|
|
2271
|
+
leaveCancelled: {
|
|
2272
|
+
type: PropType<PropFunction>;
|
|
2273
|
+
required: false;
|
|
2274
|
+
};
|
|
2275
|
+
beforeShow: {
|
|
2276
|
+
type: PropType<PropFunction>;
|
|
2277
|
+
required: false;
|
|
2278
|
+
};
|
|
2279
|
+
show: {
|
|
2280
|
+
type: PropType<PropFunction>;
|
|
2281
|
+
required: false;
|
|
2282
|
+
};
|
|
2283
|
+
afterShow: {
|
|
2284
|
+
type: PropType<PropFunction>;
|
|
2285
|
+
required: false;
|
|
2286
|
+
};
|
|
2287
|
+
showCancelled: {
|
|
2288
|
+
type: PropType<PropFunction>;
|
|
2289
|
+
required: false;
|
|
2290
|
+
};
|
|
2291
|
+
beforeHide: {
|
|
2292
|
+
type: PropType<PropFunction>;
|
|
2293
|
+
required: false;
|
|
2294
|
+
};
|
|
2295
|
+
hide: {
|
|
2296
|
+
type: PropType<PropFunction>;
|
|
2297
|
+
required: false;
|
|
2298
|
+
};
|
|
2299
|
+
afterHide: {
|
|
2300
|
+
type: PropType<PropFunction>;
|
|
2301
|
+
required: false;
|
|
2302
|
+
};
|
|
2303
|
+
hideCancelled: {
|
|
2304
|
+
type: PropType<PropFunction>;
|
|
2305
|
+
required: false;
|
|
2306
|
+
};
|
|
2307
|
+
}>, (() => VNode<RendererNode, RendererElement, {
|
|
2308
|
+
[key: string]: any;
|
|
2309
|
+
}> | VNode<RendererNode, RendererElement, {
|
|
2310
|
+
[key: string]: any;
|
|
2311
|
+
}>[] | null) | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
2312
|
+
name: {
|
|
2313
|
+
type: PropType<string>;
|
|
2314
|
+
required: false;
|
|
2315
|
+
default: string;
|
|
2316
|
+
};
|
|
2317
|
+
modelSlot: {
|
|
2318
|
+
type: PropType<ModelSlot>;
|
|
2319
|
+
required: false;
|
|
2320
|
+
};
|
|
2321
|
+
multi: {
|
|
2322
|
+
type: PropType<boolean>;
|
|
2323
|
+
required: false;
|
|
2324
|
+
default: boolean;
|
|
2325
|
+
};
|
|
2326
|
+
tag: {
|
|
2327
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2328
|
+
required: false;
|
|
2329
|
+
default: string;
|
|
2330
|
+
};
|
|
2331
|
+
viewTag: {
|
|
2332
|
+
type: PropType<string | unknown | PropFunction>;
|
|
2333
|
+
required: false;
|
|
2334
|
+
default: string;
|
|
2335
|
+
};
|
|
2336
|
+
viewTagProps: {
|
|
2337
|
+
type: PropType<unknown | PropFunction>;
|
|
2338
|
+
required: false;
|
|
2339
|
+
default(): {};
|
|
2340
|
+
};
|
|
2341
|
+
viewClass: {
|
|
2342
|
+
type: PropType<string | PropFunction>;
|
|
2343
|
+
required: false;
|
|
2344
|
+
};
|
|
2345
|
+
viewActiveClass: {
|
|
2346
|
+
type: PropType<string | PropFunction>;
|
|
2347
|
+
required: false;
|
|
2348
|
+
};
|
|
2349
|
+
viewInactiveClass: {
|
|
2350
|
+
type: PropType<string | PropFunction>;
|
|
2351
|
+
required: false;
|
|
2352
|
+
};
|
|
2353
|
+
transition: {
|
|
2354
|
+
type: PropType<TransitionProp>;
|
|
2355
|
+
required: false;
|
|
2356
|
+
default: boolean;
|
|
2357
|
+
};
|
|
2358
|
+
transitionName: {
|
|
2359
|
+
type: PropType<string>;
|
|
2360
|
+
required: false;
|
|
2361
|
+
};
|
|
2362
|
+
transitionDuration: {
|
|
2363
|
+
type: PropType<string | number | {
|
|
2364
|
+
enter: number;
|
|
2365
|
+
leave: number;
|
|
2366
|
+
show: number;
|
|
2367
|
+
hide: number;
|
|
2368
|
+
}>;
|
|
2369
|
+
required: false;
|
|
2370
|
+
};
|
|
2371
|
+
enterFromClass: {
|
|
2372
|
+
type: PropType<string>;
|
|
2373
|
+
required: false;
|
|
2374
|
+
};
|
|
2375
|
+
enterActiveClass: {
|
|
2376
|
+
type: PropType<string>;
|
|
2377
|
+
required: false;
|
|
2378
|
+
};
|
|
2379
|
+
enterToClass: {
|
|
2380
|
+
type: PropType<string>;
|
|
2381
|
+
required: false;
|
|
2382
|
+
};
|
|
2383
|
+
leaveFromClass: {
|
|
2384
|
+
type: PropType<string>;
|
|
2385
|
+
required: false;
|
|
2386
|
+
};
|
|
2387
|
+
leaveActiveClass: {
|
|
2388
|
+
type: PropType<string>;
|
|
2389
|
+
required: false;
|
|
2390
|
+
};
|
|
2391
|
+
leaveToClass: {
|
|
2392
|
+
type: PropType<string>;
|
|
2393
|
+
required: false;
|
|
2394
|
+
};
|
|
2395
|
+
showFromClass: {
|
|
2396
|
+
type: PropType<string>;
|
|
2397
|
+
required: false;
|
|
2398
|
+
};
|
|
2399
|
+
showActiveClass: {
|
|
2400
|
+
type: PropType<string>;
|
|
2401
|
+
required: false;
|
|
2402
|
+
};
|
|
2403
|
+
showToClass: {
|
|
2404
|
+
type: PropType<string>;
|
|
2405
|
+
required: false;
|
|
2406
|
+
};
|
|
2407
|
+
hideFromClass: {
|
|
2408
|
+
type: PropType<string>;
|
|
2409
|
+
required: false;
|
|
2410
|
+
};
|
|
2411
|
+
hideActiveClass: {
|
|
2412
|
+
type: PropType<string>;
|
|
2413
|
+
required: false;
|
|
2414
|
+
};
|
|
2415
|
+
hideToClass: {
|
|
2416
|
+
type: PropType<string>;
|
|
2417
|
+
required: false;
|
|
2418
|
+
};
|
|
2419
|
+
beforeEnter: {
|
|
2420
|
+
type: PropType<PropFunction>;
|
|
2421
|
+
required: false;
|
|
2422
|
+
};
|
|
2423
|
+
enter: {
|
|
2424
|
+
type: PropType<PropFunction>;
|
|
2425
|
+
required: false;
|
|
2426
|
+
};
|
|
2427
|
+
afterEnter: {
|
|
2428
|
+
type: PropType<PropFunction>;
|
|
2429
|
+
required: false;
|
|
2430
|
+
};
|
|
2431
|
+
enterCancelled: {
|
|
2432
|
+
type: PropType<PropFunction>;
|
|
2433
|
+
required: false;
|
|
2434
|
+
};
|
|
2435
|
+
beforeLeave: {
|
|
2436
|
+
type: PropType<PropFunction>;
|
|
2437
|
+
required: false;
|
|
2438
|
+
};
|
|
2439
|
+
leave: {
|
|
2440
|
+
type: PropType<PropFunction>;
|
|
2441
|
+
required: false;
|
|
2442
|
+
};
|
|
2443
|
+
afterLeave: {
|
|
2444
|
+
type: PropType<PropFunction>;
|
|
2445
|
+
required: false;
|
|
2446
|
+
};
|
|
2447
|
+
leaveCancelled: {
|
|
2448
|
+
type: PropType<PropFunction>;
|
|
2449
|
+
required: false;
|
|
2450
|
+
};
|
|
2451
|
+
beforeShow: {
|
|
2452
|
+
type: PropType<PropFunction>;
|
|
2453
|
+
required: false;
|
|
2454
|
+
};
|
|
2455
|
+
show: {
|
|
2456
|
+
type: PropType<PropFunction>;
|
|
2457
|
+
required: false;
|
|
2458
|
+
};
|
|
2459
|
+
afterShow: {
|
|
2460
|
+
type: PropType<PropFunction>;
|
|
2461
|
+
required: false;
|
|
2462
|
+
};
|
|
2463
|
+
showCancelled: {
|
|
2464
|
+
type: PropType<PropFunction>;
|
|
2465
|
+
required: false;
|
|
2466
|
+
};
|
|
2467
|
+
beforeHide: {
|
|
2468
|
+
type: PropType<PropFunction>;
|
|
2469
|
+
required: false;
|
|
2470
|
+
};
|
|
2471
|
+
hide: {
|
|
2472
|
+
type: PropType<PropFunction>;
|
|
2473
|
+
required: false;
|
|
2474
|
+
};
|
|
2475
|
+
afterHide: {
|
|
2476
|
+
type: PropType<PropFunction>;
|
|
2477
|
+
required: false;
|
|
2478
|
+
};
|
|
2479
|
+
hideCancelled: {
|
|
2480
|
+
type: PropType<PropFunction>;
|
|
2481
|
+
required: false;
|
|
2482
|
+
};
|
|
2483
|
+
}>> & Readonly<{}>, {
|
|
2484
|
+
name: string;
|
|
2485
|
+
multi: boolean;
|
|
2486
|
+
tag: string;
|
|
2487
|
+
viewTag: string;
|
|
2488
|
+
viewTagProps: {};
|
|
2489
|
+
transition: TransitionProp;
|
|
2490
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1636
2491
|
|
|
1637
|
-
declare
|
|
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;
|
|
1655
|
-
};
|
|
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
|
-
}
|
|
2492
|
+
declare const routeSessionCacheKey: unique symbol;
|
|
1671
2493
|
|
|
1672
|
-
|
|
2494
|
+
declare const routeUpdatedCallback: unique symbol;
|
|
2495
|
+
|
|
2496
|
+
declare const sessionKey: unique symbol;
|
|
1673
2497
|
|
|
1674
2498
|
/**
|
|
1675
2499
|
* shallow reactive state
|
|
@@ -1677,7 +2501,7 @@ export declare const sessionKey: unique symbol;
|
|
|
1677
2501
|
* @param options
|
|
1678
2502
|
* @returns
|
|
1679
2503
|
*/
|
|
1680
|
-
export declare function shallowReactiveState<T extends Record<string, any>>(state: T, options?:
|
|
2504
|
+
export declare function shallowReactiveState<T extends Record<string, any>>(state: T, options?: StatePersistOptions): T;
|
|
1681
2505
|
|
|
1682
2506
|
/**
|
|
1683
2507
|
* 插槽
|
|
@@ -1713,14 +2537,19 @@ declare const _start: unique symbol;
|
|
|
1713
2537
|
/**
|
|
1714
2538
|
* state参数
|
|
1715
2539
|
*/
|
|
1716
|
-
export declare type
|
|
2540
|
+
export declare type StatePersistOptions = {
|
|
1717
2541
|
name?: string;
|
|
1718
|
-
persistPolicy?:
|
|
2542
|
+
persistPolicy?: StatePersistPolicy;
|
|
1719
2543
|
storage?: Storage;
|
|
1720
2544
|
debounce?: boolean;
|
|
1721
2545
|
debounceDelay?: number;
|
|
1722
2546
|
};
|
|
1723
2547
|
|
|
2548
|
+
/**
|
|
2549
|
+
* 持久化策略
|
|
2550
|
+
*/
|
|
2551
|
+
declare type StatePersistPolicy = 'memory' | 'session' | 'local' | 'custom';
|
|
2552
|
+
|
|
1724
2553
|
declare const statusKey: unique symbol;
|
|
1725
2554
|
|
|
1726
2555
|
/**
|
|
@@ -1744,7 +2573,6 @@ declare interface Storage_2 {
|
|
|
1744
2573
|
*/
|
|
1745
2574
|
removeItem(key: string): void;
|
|
1746
2575
|
}
|
|
1747
|
-
export { Storage_2 as Storage }
|
|
1748
2576
|
|
|
1749
2577
|
declare const successFnsKey: unique symbol;
|
|
1750
2578
|
|
|
@@ -1776,7 +2604,7 @@ export declare const toTypeString: (value: unknown) => string;
|
|
|
1776
2604
|
/**
|
|
1777
2605
|
* 过渡属性
|
|
1778
2606
|
*/
|
|
1779
|
-
|
|
2607
|
+
declare type TransitionProp = {
|
|
1780
2608
|
(route: Route, index: number): CustomTransition | boolean;
|
|
1781
2609
|
} | CustomTransition | boolean;
|
|
1782
2610
|
|
|
@@ -1825,7 +2653,7 @@ declare class TreeImpl extends TreeNodeImpl implements Tree {
|
|
|
1825
2653
|
/**
|
|
1826
2654
|
* 默认构造函数
|
|
1827
2655
|
*/
|
|
1828
|
-
constructor(options?:
|
|
2656
|
+
constructor(options?: PersistOptions, defaultState?: Record<string, any>);
|
|
1829
2657
|
/**
|
|
1830
2658
|
* 加入数据
|
|
1831
2659
|
* @param args
|
|
@@ -1897,15 +2725,6 @@ declare class TreeNodeImpl implements TreeNode {
|
|
|
1897
2725
|
constructor(id: string);
|
|
1898
2726
|
}
|
|
1899
2727
|
|
|
1900
|
-
/**
|
|
1901
|
-
* Tree参数
|
|
1902
|
-
*/
|
|
1903
|
-
declare type TreeOptions = {
|
|
1904
|
-
name?: string;
|
|
1905
|
-
persistPolicy?: PersistPolicy;
|
|
1906
|
-
storage?: Storage_2;
|
|
1907
|
-
};
|
|
1908
|
-
|
|
1909
2728
|
/**
|
|
1910
2729
|
* 判断类型
|
|
1911
2730
|
* @param obj
|
|
@@ -1933,37 +2752,38 @@ declare enum UpdateType {
|
|
|
1933
2752
|
|
|
1934
2753
|
/**
|
|
1935
2754
|
* Returns the global bus
|
|
1936
|
-
* @param
|
|
2755
|
+
* @param contextRelationKey 上下文关联key
|
|
1937
2756
|
* @returns
|
|
1938
2757
|
*/
|
|
1939
|
-
export declare function useBus(
|
|
2758
|
+
export declare function useBus(contextRelationKey?: FoxContextRelationKey): BusInterface | null;
|
|
1940
2759
|
|
|
1941
2760
|
/**
|
|
1942
2761
|
* Returns the global event proxy
|
|
1943
|
-
* @param proxy
|
|
1944
2762
|
* @returns
|
|
1945
2763
|
*/
|
|
1946
|
-
export declare function useEventProxy(
|
|
2764
|
+
export declare function useEventProxy(contextRelationKey?: FoxContextRelationKey): EventProxy | null;
|
|
1947
2765
|
|
|
1948
2766
|
/**
|
|
1949
2767
|
* Returns the current fox
|
|
1950
|
-
* @param
|
|
2768
|
+
* @param contextRelationKey 上下文关联key
|
|
2769
|
+
*
|
|
1951
2770
|
* @returns
|
|
1952
2771
|
*/
|
|
1953
|
-
export declare function useFox(
|
|
2772
|
+
export declare function useFox(contextRelationKey?: FoxContextRelationKey): Fox | null;
|
|
1954
2773
|
|
|
1955
2774
|
/**
|
|
1956
2775
|
* Returns the current route
|
|
1957
|
-
* @param
|
|
2776
|
+
* @param 上下文关联key
|
|
1958
2777
|
* @returns
|
|
1959
2778
|
*/
|
|
1960
|
-
export declare function useRoute(
|
|
2779
|
+
export declare function useRoute(contextRelationKey?: FoxContextRelationKey): Route | null;
|
|
1961
2780
|
|
|
1962
2781
|
/**
|
|
1963
2782
|
* Returns the current router
|
|
2783
|
+
* @param 上下文关联key
|
|
1964
2784
|
* @returns
|
|
1965
2785
|
*/
|
|
1966
|
-
export declare function useRouter(
|
|
2786
|
+
export declare function useRouter(contextRelationKey?: FoxContextRelationKey): Router | null;
|
|
1967
2787
|
|
|
1968
2788
|
declare const valueKey: unique symbol;
|
|
1969
2789
|
|
|
@@ -2043,4 +2863,14 @@ declare class ViewPlace {
|
|
|
2043
2863
|
static include(list: ViewPlace[], viewPlace: ViewPlace): boolean;
|
|
2044
2864
|
}
|
|
2045
2865
|
|
|
2866
|
+
/**
|
|
2867
|
+
* 在绑定LifecycleContext上下文中中执行函数
|
|
2868
|
+
*
|
|
2869
|
+
* currentScope(effectScope)为空的情况的替代方案
|
|
2870
|
+
* @param ctx
|
|
2871
|
+
* @param fn
|
|
2872
|
+
* @returns
|
|
2873
|
+
*/
|
|
2874
|
+
export declare function withLifecycleContext<T>(ctx: LifecycleContext, fn: () => Promise<T> | T): Promise<T>;
|
|
2875
|
+
|
|
2046
2876
|
export { }
|