@whitesev/utils 2.4.6 → 2.4.7
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/dist/index.amd.js +10 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +10 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +10 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +10 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +10 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +3 -3
- package/dist/types/src/WindowApi.d.ts +2 -2
- package/dist/types/src/types/WindowApi.d.ts +3 -3
- package/package.json +1 -1
- package/src/Utils.ts +5 -5
- package/src/WindowApi.ts +13 -4
- package/src/types/WindowApi.d.ts +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -3826,9 +3826,18 @@ class WindowApi {
|
|
|
3826
3826
|
/** 使用的配置 */
|
|
3827
3827
|
api;
|
|
3828
3828
|
constructor(option) {
|
|
3829
|
+
if (option) {
|
|
3830
|
+
if (option.globalThis == null) {
|
|
3831
|
+
option.globalThis = option.window;
|
|
3832
|
+
}
|
|
3833
|
+
if (option.self == null) {
|
|
3834
|
+
option.self = option.window;
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3829
3837
|
if (!option) {
|
|
3830
3838
|
option = Object.assign({}, this.defaultApi);
|
|
3831
3839
|
}
|
|
3840
|
+
// @ts-ignore
|
|
3832
3841
|
this.api = Object.assign({}, option);
|
|
3833
3842
|
}
|
|
3834
3843
|
get document() {
|
|
@@ -4093,7 +4102,7 @@ class Utils {
|
|
|
4093
4102
|
this.windowApi = new WindowApi(option);
|
|
4094
4103
|
}
|
|
4095
4104
|
/** 版本号 */
|
|
4096
|
-
version = "2024.11.
|
|
4105
|
+
version = "2024.11.6";
|
|
4097
4106
|
addStyle(cssText) {
|
|
4098
4107
|
if (typeof cssText !== "string") {
|
|
4099
4108
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|