@kmkf-fe-packages/services-components 0.22.0-alpha.0 → 0.22.0-alpha.3
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.
|
@@ -58,7 +58,8 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
58
58
|
});
|
|
59
59
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
60
60
|
var _this$getComponentVal2;
|
|
61
|
-
|
|
61
|
+
var val = (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
62
|
+
return typeof val === 'number' ? val + '' : val;
|
|
62
63
|
});
|
|
63
64
|
_defineProperty(this, "editRender", function () {
|
|
64
65
|
return null;
|
|
@@ -15,6 +15,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
15
15
|
children: ComponentInterface[];
|
|
16
16
|
dataType: ComponentInterface['dataType'];
|
|
17
17
|
goods: BsHeaderGood;
|
|
18
|
+
showHeader: string[];
|
|
18
19
|
constructor(options: PickOption);
|
|
19
20
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
21
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
@@ -18,7 +18,8 @@ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
19
|
var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
20
20
|
var _this = this,
|
|
21
|
-
_this$
|
|
21
|
+
_this$componentConfig,
|
|
22
|
+
_this$componentConfig2;
|
|
22
23
|
_classCallCheck(this, EItemEncode);
|
|
23
24
|
_defineProperty(this, "name", void 0);
|
|
24
25
|
_defineProperty(this, "id", void 0);
|
|
@@ -33,34 +34,32 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
33
34
|
_defineProperty(this, "children", void 0);
|
|
34
35
|
_defineProperty(this, "dataType", void 0);
|
|
35
36
|
_defineProperty(this, "goods", void 0);
|
|
37
|
+
_defineProperty(this, "showHeader", void 0);
|
|
36
38
|
_defineProperty(this, "renderClient", function (record) {
|
|
37
|
-
var _this$componentConfig;
|
|
38
39
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
39
40
|
id: _this.id,
|
|
40
41
|
label: _this.name,
|
|
41
42
|
value: /*#__PURE__*/React.createElement(TBGoodTable, {
|
|
42
43
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
43
|
-
showHeader:
|
|
44
|
+
showHeader: _this.showHeader
|
|
44
45
|
})
|
|
45
46
|
})) : null;
|
|
46
47
|
});
|
|
47
48
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
-
var _this$componentConfig2;
|
|
49
49
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
50
50
|
id: _this.id,
|
|
51
51
|
label: _this.name,
|
|
52
52
|
value: /*#__PURE__*/React.createElement(TBGoodTable, {
|
|
53
53
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
54
|
-
showHeader:
|
|
54
|
+
showHeader: _this.showHeader
|
|
55
55
|
})
|
|
56
56
|
})) : null;
|
|
57
57
|
});
|
|
58
58
|
_defineProperty(this, "renderLog", function (r) {
|
|
59
|
-
var _this$componentConfig3;
|
|
60
59
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")])) return null;
|
|
61
60
|
return /*#__PURE__*/React.createElement(TBGoodTable, {
|
|
62
61
|
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")]) || [],
|
|
63
|
-
showHeader:
|
|
62
|
+
showHeader: _this.showHeader
|
|
64
63
|
});
|
|
65
64
|
});
|
|
66
65
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
@@ -103,6 +102,21 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
103
102
|
this.type = options.type;
|
|
104
103
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
105
104
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
105
|
+
this.showHeader = ((_this$componentConfig = this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || ['title',
|
|
106
|
+
// 商品名称
|
|
107
|
+
'outerId',
|
|
108
|
+
// 商品编码
|
|
109
|
+
'picUrl',
|
|
110
|
+
// 图片
|
|
111
|
+
'numIid',
|
|
112
|
+
// 商品id
|
|
113
|
+
'skuId',
|
|
114
|
+
// skuId
|
|
115
|
+
'outerSkuId',
|
|
116
|
+
// sku编码
|
|
117
|
+
'propertiesName' // sku 信息
|
|
118
|
+
];
|
|
119
|
+
|
|
106
120
|
this.isCombinationComponent = true;
|
|
107
121
|
this.canSort = false;
|
|
108
122
|
this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -110,7 +124,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
110
124
|
name: "商品信息"
|
|
111
125
|
}));
|
|
112
126
|
this.children = [this.goods];
|
|
113
|
-
this.rules = this !== null && this !== void 0 && (_this$
|
|
127
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
114
128
|
required: true,
|
|
115
129
|
validator: function validator(_, value) {
|
|
116
130
|
if (!value || !value.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.22.0-alpha.
|
|
3
|
+
"version": "0.22.0-alpha.3",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.22.0-alpha.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.22.0-alpha.3",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.22.0-alpha.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "10882c1941c755b1214d3696acd401b9b56cc5d1",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|