@kmkf-fe-packages/services-components 1.22.1-beta.45 → 1.22.1-beta.46
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.
|
@@ -26,6 +26,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
26
26
|
}[];
|
|
27
27
|
constructor(options: PickOption);
|
|
28
28
|
getSortChildFields: () => any;
|
|
29
|
+
getShowHeader: (showHeader: any) => any[];
|
|
29
30
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
30
31
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
31
32
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -39,14 +39,6 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
39
39
|
_defineProperty(this, "platform", void 0);
|
|
40
40
|
_defineProperty(this, "sortChildField", void 0);
|
|
41
41
|
_defineProperty(this, "getSortChildFields", function () {
|
|
42
|
-
// const mapping = {
|
|
43
|
-
// title: "商品名称",
|
|
44
|
-
// outerId: "商品编码",
|
|
45
|
-
// numIid: "商品id",
|
|
46
|
-
// skuId: "skuId",
|
|
47
|
-
// outerSkuId: "sku编码",
|
|
48
|
-
// propertiesName: "sku信息",
|
|
49
|
-
// };
|
|
50
42
|
return columnsGoodsList.filter(function (item) {
|
|
51
43
|
return item.dataIndex !== "picUrl";
|
|
52
44
|
}).map(function (item) {
|
|
@@ -57,14 +49,22 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
57
49
|
disabled: !_this.showHeader.includes(item.dataIndex)
|
|
58
50
|
};
|
|
59
51
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
});
|
|
53
|
+
_defineProperty(this, "getShowHeader", function (showHeader) {
|
|
54
|
+
if (!Array.isArray(showHeader)) {
|
|
55
|
+
return columnsGoodsList.map(function (item) {
|
|
56
|
+
return item.dataIndex;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
60
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
61
|
+
if (isStringArray) return showHeader;
|
|
62
|
+
if (isObjectArray) return showHeader.filter(function (item) {
|
|
63
|
+
return item.show !== false;
|
|
64
|
+
}).map(function (item) {
|
|
65
|
+
return item.dataIndex;
|
|
66
|
+
});
|
|
67
|
+
return [];
|
|
68
68
|
});
|
|
69
69
|
_defineProperty(this, "renderClient", function (record) {
|
|
70
70
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
@@ -145,9 +145,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
145
145
|
this.type = options.type;
|
|
146
146
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
147
147
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
148
|
-
this.showHeader = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader)
|
|
149
|
-
return item.dataIndex;
|
|
150
|
-
});
|
|
148
|
+
this.showHeader = this.getShowHeader((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader);
|
|
151
149
|
this.isCombinationComponent = true;
|
|
152
150
|
this.canSort = false;
|
|
153
151
|
this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.22.1-beta.
|
|
3
|
+
"version": "1.22.1-beta.46",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "54e180f241ba683d8ce83756c0101b2c8b37a30b",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|