@airpower/web 0.4.1 → 0.4.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.
Files changed (2) hide show
  1. package/dist/main.js +8 -6
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -892,26 +892,28 @@ class Transformer {
892
892
  * @param fields 属性列表
893
893
  */
894
894
  expose(...fields) {
895
- const fieldList = Object.keys(this);
895
+ const copy = this.copy();
896
+ const fieldList = Object.keys(copy);
896
897
  for (const field of fieldList) {
897
898
  if (!fields.includes(field)) {
898
- this[field] = void 0;
899
+ copy[field] = void 0;
899
900
  }
900
901
  }
901
- return this;
902
+ return copy;
902
903
  }
903
904
  /**
904
905
  * ### 排除部分类的属性
905
906
  * @param fields 属性列表
906
907
  */
907
908
  exclude(...fields) {
908
- const fieldList = Object.keys(this);
909
+ const copy = this.copy();
910
+ const fieldList = Object.keys(copy);
909
911
  for (const field of fieldList) {
910
912
  if (fields.includes(field)) {
911
- this[field] = void 0;
913
+ copy[field] = void 0;
912
914
  }
913
915
  }
914
- return this;
916
+ return copy;
915
917
  }
916
918
  /**
917
919
  * ### 用指定的数据对当前实例进行覆盖
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "0.4.1",
4
+ "version": "0.4.2",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@airpower/enum": "^0.1.0",
43
43
  "@airpower/i18n": "^0.1.0",
44
- "@airpower/transformer": "^0.2.0",
44
+ "@airpower/transformer": "^0.2.1",
45
45
  "@airpower/util": "^0.2.2",
46
46
  "@element-plus/icons-vue": "^2.3.1",
47
47
  "axios": "^1.8.4",