@whitesev/utils 2.1.0 → 2.1.2

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.
@@ -2636,8 +2636,6 @@ var Utils = (function () {
2636
2636
  let request = idbStore.put(inData);
2637
2637
  request.onsuccess = function (event) {
2638
2638
  /* 保存成功有success 字段 */
2639
- // @ts-ignore
2640
- event.target;
2641
2639
  resolve({
2642
2640
  success: true,
2643
2641
  code: that.#errorCode.success.code,
@@ -2646,8 +2644,6 @@ var Utils = (function () {
2646
2644
  });
2647
2645
  };
2648
2646
  request.onerror = function (event) {
2649
- // @ts-ignore
2650
- event.target;
2651
2647
  resolve({
2652
2648
  success: false,
2653
2649
  code: that.#errorCode.save.code,
@@ -2666,8 +2662,8 @@ var Utils = (function () {
2666
2662
  async get(key) {
2667
2663
  let that = this;
2668
2664
  return new Promise((resolve) => {
2669
- let dbName = that.#dbName;
2670
- that.open(function (idbStore, success) {
2665
+ let dbName = this.#dbName;
2666
+ this.open(function (idbStore, success) {
2671
2667
  /* 判断返回的数据中是否有error字段 */
2672
2668
  if (!success) {
2673
2669
  resolve({
@@ -3483,7 +3479,7 @@ var Utils = (function () {
3483
3479
  }
3484
3480
  }
3485
3481
 
3486
- class UtilsWindowApi {
3482
+ class WindowApi {
3487
3483
  /** 默认的配置 */
3488
3484
  defaultApi = {
3489
3485
  document: document,
@@ -3520,10 +3516,10 @@ var Utils = (function () {
3520
3516
  class Utils {
3521
3517
  windowApi;
3522
3518
  constructor(option) {
3523
- this.windowApi = new UtilsWindowApi(option);
3519
+ this.windowApi = new WindowApi(option);
3524
3520
  }
3525
3521
  /** 版本号 */
3526
- version = "2024.7.20";
3522
+ version = "2024.7.24";
3527
3523
  addStyle(cssText) {
3528
3524
  if (typeof cssText !== "string") {
3529
3525
  throw new Error("Utils.addStyle 参数cssText 必须为String类型");
@@ -5833,7 +5829,8 @@ var Utils = (function () {
5833
5829
  if (Array.isArray(data)) {
5834
5830
  data.sort(sortFunc);
5835
5831
  }
5836
- else if (data instanceof NodeList || UtilsContext.isJQuery(data)) {
5832
+ else if (data instanceof NodeList ||
5833
+ UtilsContext.isJQuery(data)) {
5837
5834
  sortNodeFunc(data, getDataFunc);
5838
5835
  result = getDataFunc();
5839
5836
  }