@fox-js/fox 3.1.1-21 → 3.1.1-23
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 -1
- package/libs/index.esm.d.ts +106 -83
- package/libs/index.esm.js +1380 -1356
- package/libs/index.umd.js +1 -1
- package/package.json +1 -1
package/libs/index.esm.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
5
5
|
import { ComponentPublicInstance } from 'vue';
|
|
6
6
|
import { DefineComponent } from 'vue';
|
|
7
7
|
import { ExtractPropTypes } from 'vue';
|
|
8
|
-
import { HistoryUpdatePolicy } from './operationType';
|
|
9
8
|
import { InjectionKey } from 'vue';
|
|
10
9
|
import { PropType } from 'vue';
|
|
11
10
|
import { PublicProps } from 'vue';
|
|
@@ -74,16 +73,6 @@ declare const chainKey: unique symbol;
|
|
|
74
73
|
|
|
75
74
|
declare const childrenKey: unique symbol;
|
|
76
75
|
|
|
77
|
-
/**
|
|
78
|
-
* 克隆对象
|
|
79
|
-
* @param target
|
|
80
|
-
* @param source
|
|
81
|
-
* @param plain
|
|
82
|
-
*
|
|
83
|
-
* @returns
|
|
84
|
-
*/
|
|
85
|
-
export declare function clone(target: any, source: any, plain?: boolean): any;
|
|
86
|
-
|
|
87
76
|
declare const _cloneRouteRecorder: unique symbol;
|
|
88
77
|
|
|
89
78
|
declare const _constructRouteModel: unique symbol;
|
|
@@ -441,18 +430,12 @@ export declare interface Fox {
|
|
|
441
430
|
* 获取require
|
|
442
431
|
*/
|
|
443
432
|
get require(): Require;
|
|
444
|
-
/**
|
|
445
|
-
* 返回extend
|
|
446
|
-
*/
|
|
447
|
-
get extend(): Function;
|
|
448
|
-
/**
|
|
449
|
-
* 返回clone
|
|
450
|
-
*/
|
|
451
|
-
get clone(): Function;
|
|
452
433
|
/**
|
|
453
434
|
* 判断是否为es模块
|
|
454
435
|
*/
|
|
455
|
-
get isESModule():
|
|
436
|
+
get isESModule(): {
|
|
437
|
+
(mod: any): boolean;
|
|
438
|
+
};
|
|
456
439
|
/**
|
|
457
440
|
* 安装
|
|
458
441
|
* @param app
|
|
@@ -540,7 +523,7 @@ declare const historyKey: unique symbol;
|
|
|
540
523
|
/**
|
|
541
524
|
* 历史更新策略
|
|
542
525
|
*/
|
|
543
|
-
declare type
|
|
526
|
+
declare type HistoryUpdatePolicy = 'push' | 'replace' | 'traceless';
|
|
544
527
|
|
|
545
528
|
declare const idKey: unique symbol;
|
|
546
529
|
|
|
@@ -919,7 +902,8 @@ declare const _removeRouteRecorder: unique symbol;
|
|
|
919
902
|
declare const _removeView: unique symbol;
|
|
920
903
|
|
|
921
904
|
/**
|
|
922
|
-
*
|
|
905
|
+
* 依赖加载器
|
|
906
|
+
* 支持js(amd、esm格式) 和 css
|
|
923
907
|
*/
|
|
924
908
|
declare class Require {
|
|
925
909
|
/**
|
|
@@ -927,78 +911,82 @@ declare class Require {
|
|
|
927
911
|
*/
|
|
928
912
|
private moduleManager;
|
|
929
913
|
/**
|
|
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
|
-
* 设置路径别名
|
|
914
|
+
* 路径别名
|
|
943
915
|
*/
|
|
916
|
+
private _alias;
|
|
944
917
|
set alias(alias: Record<string, string>);
|
|
918
|
+
get alias(): Record<string, string>;
|
|
919
|
+
private _resourceParser?;
|
|
920
|
+
set resourceParser(parser: RequireResourceParser);
|
|
921
|
+
get resourceParser(): RequireResourceParser | undefined;
|
|
945
922
|
/**
|
|
946
|
-
*
|
|
923
|
+
* 设置超时时间
|
|
947
924
|
*/
|
|
948
|
-
|
|
925
|
+
private _timeout?;
|
|
926
|
+
set timeout(time: number);
|
|
927
|
+
get timeout(): number | undefined;
|
|
949
928
|
/**
|
|
950
|
-
*
|
|
929
|
+
* 设置query
|
|
951
930
|
*/
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
931
|
+
private _query?;
|
|
932
|
+
set query(val: Record<string, string>);
|
|
933
|
+
get query(): Record<string, string> | undefined;
|
|
955
934
|
/**
|
|
956
|
-
*
|
|
935
|
+
* 获取document head
|
|
957
936
|
*/
|
|
958
|
-
get
|
|
959
|
-
(path: string): boolean;
|
|
960
|
-
};
|
|
937
|
+
get head(): any;
|
|
961
938
|
/**
|
|
962
|
-
*
|
|
939
|
+
* css挂载点
|
|
963
940
|
*/
|
|
964
|
-
|
|
941
|
+
private _cssMountPoint;
|
|
942
|
+
set cssMountPoint(point: any);
|
|
943
|
+
get cssMountPoint(): any;
|
|
965
944
|
/**
|
|
966
|
-
*
|
|
945
|
+
* js挂载点
|
|
967
946
|
*/
|
|
968
|
-
|
|
947
|
+
private _jsMountPoint;
|
|
948
|
+
set jsMountPoint(point: any);
|
|
949
|
+
get jsMountPoint(): any;
|
|
969
950
|
/**
|
|
970
|
-
* 设置
|
|
951
|
+
* 设置module
|
|
952
|
+
* @param id
|
|
953
|
+
* @param exports
|
|
971
954
|
*/
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
955
|
+
setModule(id: string | RegExp, exports: any | {
|
|
956
|
+
(): any;
|
|
957
|
+
}): void;
|
|
975
958
|
/**
|
|
976
|
-
*
|
|
959
|
+
* 移除module
|
|
960
|
+
* @param id
|
|
977
961
|
*/
|
|
978
|
-
|
|
962
|
+
removeModule(id: string | RegExp): void;
|
|
979
963
|
/**
|
|
980
|
-
*
|
|
964
|
+
* 获取module exports
|
|
965
|
+
* @param id
|
|
966
|
+
* @returns
|
|
981
967
|
*/
|
|
982
|
-
|
|
968
|
+
getModuleExports(id: string): any;
|
|
983
969
|
/**
|
|
984
|
-
*
|
|
970
|
+
* expose require方法
|
|
971
|
+
* @param name
|
|
972
|
+
* @param global
|
|
973
|
+
* @param debug
|
|
974
|
+
* @returns
|
|
985
975
|
*/
|
|
986
|
-
|
|
987
|
-
(): Record<string, any>;
|
|
988
|
-
}): void;
|
|
976
|
+
exposeRequire(name?: string, global?: any, debug?: boolean): boolean;
|
|
989
977
|
/**
|
|
990
|
-
*
|
|
978
|
+
* reslove resource
|
|
991
979
|
*/
|
|
992
|
-
|
|
980
|
+
private resloveResource;
|
|
993
981
|
/**
|
|
994
982
|
* 加载
|
|
995
983
|
* @params args
|
|
996
984
|
*/
|
|
997
|
-
ensure(...args: any[]):
|
|
985
|
+
ensure(...args: [...any[]] | [...any[], RequireMountedCallback]): Promise<any[]>;
|
|
998
986
|
/**
|
|
999
987
|
* 卸载
|
|
1000
988
|
*/
|
|
1001
|
-
remove(...args: any):
|
|
989
|
+
remove(...args: [...any[]] | [...any[], RequireUnMountedCallback]): Promise<boolean>;
|
|
1002
990
|
/**
|
|
1003
991
|
* 加载
|
|
1004
992
|
*
|
|
@@ -1021,6 +1009,13 @@ declare class Require {
|
|
|
1021
1009
|
* @param point
|
|
1022
1010
|
*/
|
|
1023
1011
|
private mountJS;
|
|
1012
|
+
/**
|
|
1013
|
+
* 加载cjs
|
|
1014
|
+
*
|
|
1015
|
+
* @param chain
|
|
1016
|
+
* @param task
|
|
1017
|
+
*/
|
|
1018
|
+
private mountCJS;
|
|
1024
1019
|
/**
|
|
1025
1020
|
* 卸载资源
|
|
1026
1021
|
*/
|
|
@@ -1043,33 +1038,61 @@ declare class Require {
|
|
|
1043
1038
|
*/
|
|
1044
1039
|
private createRequireLoad;
|
|
1045
1040
|
/**
|
|
1046
|
-
*
|
|
1041
|
+
* 构建资源uri
|
|
1047
1042
|
* @param uri
|
|
1048
1043
|
* @returns
|
|
1049
1044
|
*/
|
|
1050
|
-
private
|
|
1045
|
+
private constructResourceUri;
|
|
1051
1046
|
/**
|
|
1052
1047
|
* 创建search字符串
|
|
1053
1048
|
*/
|
|
1054
1049
|
private createSearch;
|
|
1055
1050
|
/**
|
|
1056
|
-
*
|
|
1051
|
+
* 获取资源路径的后缀
|
|
1057
1052
|
* @param name
|
|
1058
|
-
* @returns
|
|
1059
|
-
*/
|
|
1060
|
-
private getFileNamePostfix;
|
|
1061
|
-
/**
|
|
1062
|
-
* 是否为不处理的路径
|
|
1063
|
-
* @param uri
|
|
1064
|
-
* @return
|
|
1065
|
-
*/
|
|
1066
|
-
private isNaturePath;
|
|
1067
|
-
/**
|
|
1068
|
-
* 解析路径
|
|
1069
|
-
* @param uri
|
|
1070
|
-
* @param replace
|
|
1053
|
+
* @returns
|
|
1071
1054
|
*/
|
|
1072
|
-
private
|
|
1055
|
+
private getResourcePathSuffix;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* require mount callback
|
|
1060
|
+
*/
|
|
1061
|
+
declare interface RequireMountedCallback {
|
|
1062
|
+
(ret: boolean): void;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* 资源
|
|
1067
|
+
*/
|
|
1068
|
+
declare interface RequireResource {
|
|
1069
|
+
path: string;
|
|
1070
|
+
type?: RequireResourceType;
|
|
1071
|
+
format?: RequireResourceFormat;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* 资源类型
|
|
1076
|
+
*/
|
|
1077
|
+
declare type RequireResourceFormat = 'es' | 'umd';
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* 资源解析
|
|
1081
|
+
*/
|
|
1082
|
+
declare interface RequireResourceParser {
|
|
1083
|
+
(path: string): RequireResource | null;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* 资源类型
|
|
1088
|
+
*/
|
|
1089
|
+
declare type RequireResourceType = 'js' | 'css';
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* require unmount callback
|
|
1093
|
+
*/
|
|
1094
|
+
declare interface RequireUnMountedCallback {
|
|
1095
|
+
(): void;
|
|
1073
1096
|
}
|
|
1074
1097
|
|
|
1075
1098
|
declare const _resolveComponent: unique symbol;
|
|
@@ -1155,7 +1178,7 @@ export declare class Route {
|
|
|
1155
1178
|
/**
|
|
1156
1179
|
* 历史更新策略
|
|
1157
1180
|
*/
|
|
1158
|
-
historyUpdatePolicy?:
|
|
1181
|
+
historyUpdatePolicy?: HistoryUpdatePolicy;
|
|
1159
1182
|
/**
|
|
1160
1183
|
* view属性集合(用于multi view的tab view属性)
|
|
1161
1184
|
*/
|