@airpower/web 0.2.27 → 0.2.28

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.
@@ -35,7 +35,6 @@ export interface IFormField extends IBaseField {
35
35
  suffixIcon?: string;
36
36
  /**
37
37
  * ### 最大数字
38
- * 默认配置 `WebConfig.maxNumber` 仅在 `number` 时有效
39
38
  */
40
39
  max?: number;
41
40
  /**
@@ -1,3 +1,12 @@
1
+ /**
2
+ * ### 表格列浮动
3
+ */
1
4
  export type TableFixed = 'left' | 'right';
5
+ /**
6
+ * ### 表格列排序
7
+ */
2
8
  export type TableSortable = 'custom' | boolean;
9
+ /**
10
+ * ### 表格列对齐方式
11
+ */
3
12
  export type TableAlign = 'left' | 'center' | 'right';
package/dist/main.js CHANGED
@@ -706,6 +706,9 @@ class DecoratorUtil {
706
706
  * @param isObject `可选` 是否是对象配置
707
707
  */
708
708
  static getClassConfig(target, classConfigKey, defaultValue = void 0, isObject = false) {
709
+ if (typeof target !== "object") {
710
+ target = target.prototype;
711
+ }
709
712
  let classConfig = Reflect.get(target, classConfigKey);
710
713
  if (!isObject) {
711
714
  if (classConfig) {
@@ -780,6 +783,9 @@ class DecoratorUtil {
780
783
  * @param list `递归参数` 无需传入
781
784
  */
782
785
  static getFieldList(target, fieldConfigKey, list = []) {
786
+ if (typeof target !== "object") {
787
+ target = target.prototype;
788
+ }
783
789
  const fieldList = Reflect.get(target, fieldConfigKey) || [];
784
790
  fieldList.forEach((item) => list.includes(item) || list.push(item));
785
791
  const superClass = Reflect.getPrototypeOf(target);
@@ -795,6 +801,9 @@ class DecoratorUtil {
795
801
  * @param value 配置值
796
802
  */
797
803
  static setProperty(target, key, value) {
804
+ if (typeof target !== "object") {
805
+ target = target.prototype;
806
+ }
798
807
  Reflect.defineProperty(target, key, {
799
808
  enumerable: false,
800
809
  value,
@@ -809,6 +818,9 @@ class DecoratorUtil {
809
818
  * @param fieldListKey 类配置项列表索引值
810
819
  */
811
820
  static addFieldDecoratorKey(target, key, fieldListKey) {
821
+ if (typeof target !== "object") {
822
+ target = target.prototype;
823
+ }
812
824
  const list = Reflect.get(target, fieldListKey) || [];
813
825
  list.push(key);
814
826
  this.setProperty(target, fieldListKey, list);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "0.2.27",
4
+ "version": "0.2.28",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@airpower/enum": "^0.0.10",
43
43
  "@airpower/i18n": "^0.0.4",
44
- "@airpower/transformer": "^0.1.2",
44
+ "@airpower/transformer": "^0.1.3",
45
45
  "@airpower/util": "^0.1.3",
46
46
  "@element-plus/icons-vue": "^2.3.1",
47
47
  "axios": "^1.8.4",
File without changes