@zat-design/sisyphus-react 3.9.1-beta.9 → 3.9.2-beta.1
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/index.esm.css +28 -1
- package/dist/less.esm.css +28 -1
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +2 -1
- package/es/ProEditTable/propsType.d.ts +2 -0
- package/es/ProEnum/index.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +15 -8
- package/es/ProForm/components/combination/Group/propsType.d.ts +2 -0
- package/es/ProForm/components/combination/Group/style/index.less +15 -0
- package/es/ProForm/components/combination/Group/utils.js +43 -9
- package/es/ProForm/components/combination/ProCascader/index.js +7 -1
- package/es/ProForm/components/render/ChangedWrapper.js +2 -1
- package/es/ProLayout/style/index.less +5 -0
- package/es/ProTable/components/FormatColumn/index.js +69 -29
- package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/es/ProTable/components/RenderColumn/index.js +3 -5
- package/es/ProTable/propsType.d.ts +4 -5
- package/es/ProTable/style/index.less +23 -10
- package/es/ProTable/utils/index.d.ts +2 -0
- package/es/ProTable/utils/index.js +16 -3
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +2 -1
- package/lib/ProEditTable/propsType.d.ts +2 -0
- package/lib/ProEnum/index.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +15 -8
- package/lib/ProForm/components/combination/Group/propsType.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/style/index.less +15 -0
- package/lib/ProForm/components/combination/Group/utils.js +44 -9
- package/lib/ProForm/components/combination/ProCascader/index.js +7 -1
- package/lib/ProForm/components/render/ChangedWrapper.js +2 -1
- package/lib/ProLayout/style/index.less +5 -0
- package/lib/ProTable/components/FormatColumn/index.js +69 -29
- package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/lib/ProTable/components/RenderColumn/index.js +3 -5
- package/lib/ProTable/propsType.d.ts +4 -5
- package/lib/ProTable/style/index.less +23 -10
- package/lib/ProTable/utils/index.d.ts +2 -0
- package/lib/ProTable/utils/index.js +16 -3
- package/package.json +2 -2
@@ -12,9 +12,11 @@ export declare const getDecimalDigits: (num?: number) => number;
|
|
12
12
|
* @param any originalObj
|
13
13
|
* @param {any} dataIndex
|
14
14
|
* @return {any} isChanged 返回bool值,表示存在比对
|
15
|
+
* @return {any} isAddCell 返回bool值,表示存在比对
|
15
16
|
*/
|
16
17
|
export declare const getOriginalValue: (value: any, record: any, originalObj: any, rowKey: any, dataIndex: any) => {
|
17
18
|
originalValue: any;
|
19
|
+
isAddCell: boolean;
|
18
20
|
isChanged: boolean;
|
19
21
|
};
|
20
22
|
export declare const getColumnDataIndex: (dataIndex: string | string[]) => string;
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.isListResult = exports.getRowKey = exports.getOriginalValue = exports.getDecimalDigits = exports.getColumnDataIndex = void 0;
|
7
7
|
var _lodash = require("lodash");
|
8
|
+
var _utils = require("@zat-design/utils");
|
9
|
+
var isEmpty = _utils.validate.isEmpty;
|
8
10
|
/**
|
9
11
|
* 获取小数点后的位数
|
10
12
|
* @param num 数字
|
@@ -23,25 +25,36 @@ var getDecimalDigits = exports.getDecimalDigits = function getDecimalDigits() {
|
|
23
25
|
* @param any originalObj
|
24
26
|
* @param {any} dataIndex
|
25
27
|
* @return {any} isChanged 返回bool值,表示存在比对
|
28
|
+
* @return {any} isAddCell 返回bool值,表示存在比对
|
26
29
|
*/
|
27
30
|
var getOriginalValue = exports.getOriginalValue = function getOriginalValue(value, record, originalObj, rowKey, dataIndex) {
|
28
31
|
if (!originalObj) {
|
29
32
|
return {
|
30
33
|
originalValue: null,
|
31
|
-
isChanged: null
|
34
|
+
isChanged: null,
|
35
|
+
isAddCell: null
|
32
36
|
};
|
33
37
|
}
|
34
38
|
var originalRecord = (0, _lodash.get)(originalObj, (0, _lodash.get)(record, rowKey));
|
35
39
|
var originalValue = (0, _lodash.get)(originalRecord, dataIndex);
|
40
|
+
if (isEmpty(originalValue) && !isEmpty(value)) {
|
41
|
+
return {
|
42
|
+
originalValue: originalValue,
|
43
|
+
isAddCell: true,
|
44
|
+
isChanged: false
|
45
|
+
};
|
46
|
+
}
|
36
47
|
if (!(0, _lodash.isEqual)(originalValue, value)) {
|
37
48
|
return {
|
38
49
|
originalValue: originalValue,
|
39
|
-
isChanged: true
|
50
|
+
isChanged: true,
|
51
|
+
isAddCell: false
|
40
52
|
};
|
41
53
|
}
|
42
54
|
return {
|
43
55
|
originalValue: null,
|
44
|
-
isChanged: false
|
56
|
+
isChanged: false,
|
57
|
+
isAddCell: false
|
45
58
|
};
|
46
59
|
};
|
47
60
|
var getColumnDataIndex = exports.getColumnDataIndex = function getColumnDataIndex(dataIndex) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
3
|
-
"version": "3.9.
|
3
|
+
"version": "3.9.2-beta.1",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"@dnd-kit/sortable": "^7.0.2",
|
60
60
|
"@dnd-kit/utilities": "^3.2.1",
|
61
61
|
"@pansy/react-watermark": "^3.1.13",
|
62
|
-
"@zat-design/utils": "1.1.
|
62
|
+
"@zat-design/utils": "1.1.37",
|
63
63
|
"ahooks": "3.7.4",
|
64
64
|
"antd": "4.24.8",
|
65
65
|
"big.js": "^6.2.1",
|