@kmkf-fe-packages/services-components 0.6.3-alpha.26 → 0.6.3-alpha.27
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare type OperationLogProps = {
|
|
3
2
|
content: string;
|
|
4
3
|
operation: string;
|
|
5
4
|
componentDtoList: any[];
|
|
6
5
|
};
|
|
7
6
|
export declare const unTransField: (key: string) => boolean;
|
|
8
|
-
declare const OperationLog: ({ content, operation, componentDtoList }: OperationLogProps) => JSX.Element | null;
|
|
7
|
+
declare const OperationLog: ({ content, operation, componentDtoList }: OperationLogProps) => string | JSX.Element | null;
|
|
9
8
|
export default OperationLog;
|
|
@@ -18,7 +18,6 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
18
18
|
componentDtoList = _ref.componentDtoList;
|
|
19
19
|
if (!content) return null;
|
|
20
20
|
try {
|
|
21
|
-
var record = JSON.parse(content);
|
|
22
21
|
if (/^TRANSFER/.test(operation)) {
|
|
23
22
|
if (/^\[.*?\]-->>\[.*?\]$/.test(content)) {
|
|
24
23
|
var _content$split = content.split('-->>'),
|
|
@@ -40,6 +39,7 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
40
39
|
}, "".concat(beforeList.join(','), " => ").concat(afterList.join(',')));
|
|
41
40
|
}
|
|
42
41
|
} else if (/^(UPDATE|ADD)/.test(operation)) {
|
|
42
|
+
var record = JSON.parse(content);
|
|
43
43
|
if (/^\[.+\]$/.test(content)) {
|
|
44
44
|
var currentContent = record === null || record === void 0 ? void 0 : record.reduce(function (nxt, cur) {
|
|
45
45
|
if (!unTransField(cur['uniqueKey'])) {
|
|
@@ -121,7 +121,7 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
121
121
|
return /*#__PURE__*/React.createElement("div", null, content);
|
|
122
122
|
} catch (e) {
|
|
123
123
|
console.error('日志信息JSON转换异常', e);
|
|
124
|
-
return
|
|
124
|
+
return content;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
export default OperationLog;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.6.3-alpha.
|
|
3
|
+
"version": "0.6.3-alpha.27",
|
|
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.6.3-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.6.3-alpha.27",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.27"
|
|
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": "6568517bf5c889bc02b548d5cf4a0c03dea307ae"
|
|
44
44
|
}
|