@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.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.5";
4105
+ version = "2024.11.6";
4097
4106
  addStyle(cssText) {
4098
4107
  if (typeof cssText !== "string") {
4099
4108
  throw new Error("Utils.addStyle 参数cssText 必须为String类型");