@whitesev/utils 1.6.0 → 1.6.1

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 CHANGED
@@ -3278,14 +3278,14 @@ define((function () { 'use strict';
3278
3278
  };
3279
3279
 
3280
3280
  class UtilsDictionary {
3281
- #items = {};
3281
+ items = {};
3282
3282
  constructor() { }
3283
3283
  /**
3284
3284
  * 检查是否有某一个键
3285
3285
  * @param key 键
3286
3286
  */
3287
3287
  has(key) {
3288
- return this.#items.hasOwnProperty(key);
3288
+ return this.items.hasOwnProperty(key);
3289
3289
  }
3290
3290
  /**
3291
3291
  * 检查已有的键中是否以xx开头
@@ -3309,7 +3309,7 @@ define((function () { 'use strict';
3309
3309
  let result = null;
3310
3310
  for (const keyName of allKeys) {
3311
3311
  if (keyName.startsWith(key)) {
3312
- result = this.#items[keyName];
3312
+ result = this.items[keyName];
3313
3313
  break;
3314
3314
  }
3315
3315
  }
@@ -3324,7 +3324,7 @@ define((function () { 'use strict';
3324
3324
  if (key === void 0) {
3325
3325
  throw new Error("Utils.Dictionary().set 参数 key 不能为空");
3326
3326
  }
3327
- this.#items[key] = val;
3327
+ this.items[key] = val;
3328
3328
  }
3329
3329
  /**
3330
3330
  * 删除某一个键
@@ -3332,7 +3332,7 @@ define((function () { 'use strict';
3332
3332
  */
3333
3333
  delete(key) {
3334
3334
  if (this.has(key)) {
3335
- Reflect.deleteProperty(this.#items, key);
3335
+ Reflect.deleteProperty(this.items, key);
3336
3336
  return true;
3337
3337
  }
3338
3338
  return false;
@@ -3360,8 +3360,8 @@ define((function () { 'use strict';
3360
3360
  * 清空字典
3361
3361
  */
3362
3362
  clear() {
3363
- this.#items = void 0;
3364
- this.#items = {};
3363
+ this.items = void 0;
3364
+ this.items = {};
3365
3365
  }
3366
3366
  /**
3367
3367
  * 获取字典的长度
@@ -3379,14 +3379,14 @@ define((function () { 'use strict';
3379
3379
  * 返回字典本身
3380
3380
  */
3381
3381
  getItems() {
3382
- return this.#items;
3382
+ return this.items;
3383
3383
  }
3384
3384
  /**
3385
3385
  * 合并另一个字典
3386
3386
  * @param data 需要合并的字典
3387
3387
  */
3388
3388
  concat(data) {
3389
- this.#items = utils.assign(this.#items, data.getItems());
3389
+ this.items = utils.assign(this.items, data.getItems());
3390
3390
  }
3391
3391
  forEach(callbackfn) {
3392
3392
  for (const key in this.getItems()) {