@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.esm.js CHANGED
@@ -3824,9 +3824,18 @@ class WindowApi {
3824
3824
  /** 使用的配置 */
3825
3825
  api;
3826
3826
  constructor(option) {
3827
+ if (option) {
3828
+ if (option.globalThis == null) {
3829
+ option.globalThis = option.window;
3830
+ }
3831
+ if (option.self == null) {
3832
+ option.self = option.window;
3833
+ }
3834
+ }
3827
3835
  if (!option) {
3828
3836
  option = Object.assign({}, this.defaultApi);
3829
3837
  }
3838
+ // @ts-ignore
3830
3839
  this.api = Object.assign({}, option);
3831
3840
  }
3832
3841
  get document() {
@@ -4091,7 +4100,7 @@ class Utils {
4091
4100
  this.windowApi = new WindowApi(option);
4092
4101
  }
4093
4102
  /** 版本号 */
4094
- version = "2024.11.5";
4103
+ version = "2024.11.6";
4095
4104
  addStyle(cssText) {
4096
4105
  if (typeof cssText !== "string") {
4097
4106
  throw new Error("Utils.addStyle 参数cssText 必须为String类型");