@airpower/web 0.2.26 → 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.
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);
|
|
@@ -13642,7 +13654,7 @@ const LIST_KEY$2 = `${DecoratorUtil.DecoratorKeyPrefix}[FormList]`;
|
|
|
13642
13654
|
function Form(config = {}) {
|
|
13643
13655
|
return (target, key) => {
|
|
13644
13656
|
config.key = key;
|
|
13645
|
-
DecoratorUtil.setFieldConfig(target, key, KEY$2, config);
|
|
13657
|
+
DecoratorUtil.setFieldConfig(target, key, KEY$2, config, LIST_KEY$2);
|
|
13646
13658
|
};
|
|
13647
13659
|
}
|
|
13648
13660
|
function getFormConfig(TargetClass, key) {
|
|
@@ -16766,7 +16778,7 @@ const LIST_KEY$1 = `${DecoratorUtil.DecoratorKeyPrefix}[SearchList]`;
|
|
|
16766
16778
|
function Search(config = {}) {
|
|
16767
16779
|
return (target, key) => {
|
|
16768
16780
|
config.key = key;
|
|
16769
|
-
DecoratorUtil.setFieldConfig(target, key, KEY$1, config);
|
|
16781
|
+
DecoratorUtil.setFieldConfig(target, key, KEY$1, config, LIST_KEY$1);
|
|
16770
16782
|
};
|
|
16771
16783
|
}
|
|
16772
16784
|
function getSearchConfig(TargetClass, key) {
|
|
@@ -16792,7 +16804,7 @@ const LIST_KEY = `${DecoratorUtil.DecoratorKeyPrefix}[TableList]`;
|
|
|
16792
16804
|
function Table(config = {}) {
|
|
16793
16805
|
return (target, key) => {
|
|
16794
16806
|
config.key = key;
|
|
16795
|
-
DecoratorUtil.setFieldConfig(target, key, KEY, config);
|
|
16807
|
+
DecoratorUtil.setFieldConfig(target, key, KEY, config, LIST_KEY);
|
|
16796
16808
|
};
|
|
16797
16809
|
}
|
|
16798
16810
|
function getTableConfig(TargetClass, key) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airpower/web",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
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.
|
|
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",
|
package/dist/tests/main.d.ts
DELETED
|
File without changes
|