@kmkf-fe-packages/services-components 0.8.0 → 0.8.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.
- package/dist/esm/components/BS/BsExchange/index.js +1 -1
- package/dist/esm/components/BS/BsReissue/index.js +1 -1
- package/dist/esm/components/BS/common/BsType.js +2 -2
- package/dist/esm/components/Payment/AlipayTime.d.ts +3 -2
- package/dist/esm/components/Payment/AlipayTime.js +16 -4
- package/dist/esm/type.d.ts +2 -2
- package/package.json +4 -4
|
@@ -141,7 +141,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
141
141
|
this.isCombinationComponent = true;
|
|
142
142
|
this.canSort = false;
|
|
143
143
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
144
|
-
id: "".concat(options.id, "
|
|
144
|
+
id: "".concat(options.id, "_bsExchangeType"),
|
|
145
145
|
name: '换货类型'
|
|
146
146
|
}));
|
|
147
147
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -117,7 +117,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
117
117
|
this.isCombinationComponent = true;
|
|
118
118
|
this.canSort = false;
|
|
119
119
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
120
|
-
id: "".concat(options.id, "
|
|
120
|
+
id: "".concat(options.id, "_bsReissueType"),
|
|
121
121
|
name: '补发类型'
|
|
122
122
|
}));
|
|
123
123
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -87,11 +87,11 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
87
87
|
_defineProperty(this, "filterConfig", function (item) {
|
|
88
88
|
var _item$config;
|
|
89
89
|
var subKey = item.subKey;
|
|
90
|
-
|
|
90
|
+
var id = _this.getParentId();
|
|
91
91
|
return {
|
|
92
92
|
searchDefaultConditions: SYMBOL.in,
|
|
93
93
|
type: item.type,
|
|
94
|
-
id:
|
|
94
|
+
id: _this.id,
|
|
95
95
|
name: "".concat(item.name, "-\u7C7B\u578B"),
|
|
96
96
|
filterComponentType: 'Cascader',
|
|
97
97
|
props: {
|
|
@@ -16,9 +16,10 @@ declare class AlipayTime implements ComponentInterface {
|
|
|
16
16
|
dataType: ComponentInterface['dataType'];
|
|
17
17
|
format: ComponentInterface['format'];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
|
+
dateTimeTrans: (v: number | string) => string;
|
|
19
20
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
20
|
-
renderPc: (value: unknown, record: Record) =>
|
|
21
|
-
renderLog: (r: Record) =>
|
|
21
|
+
renderPc: (value: unknown, record: Record) => string;
|
|
22
|
+
renderLog: (r: Record) => string | null;
|
|
22
23
|
getComponentValue: (r: Record) => any;
|
|
23
24
|
renderExport: (value: string) => string | null;
|
|
24
25
|
editRender: (p: any) => React.JSX.Element;
|
|
@@ -29,16 +29,28 @@ var AlipayTime = /*#__PURE__*/_createClass(function AlipayTime(options) {
|
|
|
29
29
|
_defineProperty(this, "children", void 0);
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
31
|
_defineProperty(this, "format", void 0);
|
|
32
|
+
_defineProperty(this, "dateTimeTrans", function (v) {
|
|
33
|
+
if (typeof v === 'number') {
|
|
34
|
+
return moment(v).format('YYYY-MM-DD HH:mm:ss');
|
|
35
|
+
}
|
|
36
|
+
if (typeof v === 'string') {
|
|
37
|
+
if (/^\d+$/.test(v)) {
|
|
38
|
+
return moment(Number(v)).format('YYYY-MM-DD HH:mm:ss');
|
|
39
|
+
}
|
|
40
|
+
return v;
|
|
41
|
+
}
|
|
42
|
+
return v;
|
|
43
|
+
});
|
|
32
44
|
_defineProperty(this, "renderClient", function (record) {
|
|
33
45
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
46
|
id: _this.id,
|
|
35
47
|
label: _this.name,
|
|
36
|
-
value: record !== null && record !== void 0 && record[_this.id] ?
|
|
48
|
+
value: record !== null && record !== void 0 && record[_this.id] ? _this.dateTimeTrans(record === null || record === void 0 ? void 0 : record[_this.id]) : '--'
|
|
37
49
|
}) : null;
|
|
38
50
|
});
|
|
39
51
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
40
|
-
var
|
|
41
|
-
return (
|
|
52
|
+
var _this$dateTimeTrans;
|
|
53
|
+
return (_this$dateTimeTrans = _this.dateTimeTrans(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])) !== null && _this$dateTimeTrans !== void 0 ? _this$dateTimeTrans : '--';
|
|
42
54
|
// if (record?.[this.id] === undefined) {
|
|
43
55
|
// return <span>--</span>;
|
|
44
56
|
// }
|
|
@@ -56,7 +68,7 @@ var AlipayTime = /*#__PURE__*/_createClass(function AlipayTime(options) {
|
|
|
56
68
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
57
69
|
});
|
|
58
70
|
_defineProperty(this, "renderExport", function (value) {
|
|
59
|
-
return value ?
|
|
71
|
+
return value ? _this.dateTimeTrans(value) : null;
|
|
60
72
|
});
|
|
61
73
|
_defineProperty(this, "editRender", function (p) {
|
|
62
74
|
var _this$componentConfig, _this$componentConfig2;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export interface ComponentInterface {
|
|
|
168
168
|
* @param r
|
|
169
169
|
* @returns
|
|
170
170
|
*/
|
|
171
|
-
renderLog: (r: Record) => JSX.Element | null | JSX.Element[];
|
|
171
|
+
renderLog: (r: Record) => JSX.Element | null | JSX.Element[] | string;
|
|
172
172
|
/**
|
|
173
173
|
* 客户端卡片字段渲染,record的格式为下面这种,可以直接使用
|
|
174
174
|
* {
|
|
@@ -187,7 +187,7 @@ export interface ComponentInterface {
|
|
|
187
187
|
* @param record
|
|
188
188
|
* @returns
|
|
189
189
|
*/
|
|
190
|
-
renderPc: (value: unknown, record: Record) => JSX.Element | null | JSX.Element[];
|
|
190
|
+
renderPc: (value: unknown, record: Record) => JSX.Element | null | JSX.Element[] | string;
|
|
191
191
|
/**
|
|
192
192
|
* 导出时渲染
|
|
193
193
|
* @param p
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.1",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2fdfceaed25216a6ab0e0686be7a5aa572befdb4"
|
|
44
44
|
}
|