@hw-component/table 1.9.48 → 1.9.49
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/es/render/config.js
CHANGED
|
@@ -19,11 +19,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
19
19
|
var Link = Typography.Link,
|
|
20
20
|
Paragraph = Typography.Paragraph;
|
|
21
21
|
var getTableVal = function getTableVal(config, itemData) {
|
|
22
|
-
var _itemData$tableDataIn;
|
|
23
22
|
var dataIndex = config.dataIndex;
|
|
24
23
|
var tableDataIndex = dataIndex;
|
|
25
|
-
var val =
|
|
26
|
-
|
|
24
|
+
var val = itemData[tableDataIndex];
|
|
25
|
+
if (typeof val === "undefined" || val === null) {
|
|
26
|
+
return val;
|
|
27
|
+
}
|
|
28
|
+
var relVal = val === null || val === void 0 ? void 0 : val.toString();
|
|
29
|
+
return !!relVal ? relVal : null;
|
|
27
30
|
};
|
|
28
31
|
var dateRender = function dateRender(config, itemData) {
|
|
29
32
|
var _config$valueTypeProp = config.valueTypeProps,
|
|
@@ -112,7 +115,8 @@ var textRender = function textRender(config, itemData) {
|
|
|
112
115
|
addonAfter = valueTypeProps.addonAfter,
|
|
113
116
|
type = valueTypeProps.type,
|
|
114
117
|
ellipsis = valueTypeProps.ellipsis,
|
|
115
|
-
|
|
118
|
+
_valueTypeProps$empty = valueTypeProps.emptyNode,
|
|
119
|
+
emptyNode = _valueTypeProps$empty === void 0 ? "-" : _valueTypeProps$empty;
|
|
116
120
|
var tableVal = getTableVal(config, itemData);
|
|
117
121
|
return jsxs(Paragraph, {
|
|
118
122
|
type: type,
|
package/lib/render/config.js
CHANGED
|
@@ -22,11 +22,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
22
22
|
var Link = antd.Typography.Link,
|
|
23
23
|
Paragraph = antd.Typography.Paragraph;
|
|
24
24
|
var getTableVal = function getTableVal(config, itemData) {
|
|
25
|
-
var _itemData$tableDataIn;
|
|
26
25
|
var dataIndex = config.dataIndex;
|
|
27
26
|
var tableDataIndex = dataIndex;
|
|
28
|
-
var val =
|
|
29
|
-
|
|
27
|
+
var val = itemData[tableDataIndex];
|
|
28
|
+
if (typeof val === "undefined" || val === null) {
|
|
29
|
+
return val;
|
|
30
|
+
}
|
|
31
|
+
var relVal = val === null || val === void 0 ? void 0 : val.toString();
|
|
32
|
+
return !!relVal ? relVal : null;
|
|
30
33
|
};
|
|
31
34
|
var dateRender = function dateRender(config, itemData) {
|
|
32
35
|
var _config$valueTypeProp = config.valueTypeProps,
|
|
@@ -115,7 +118,8 @@ var textRender = function textRender(config, itemData) {
|
|
|
115
118
|
addonAfter = valueTypeProps.addonAfter,
|
|
116
119
|
type = valueTypeProps.type,
|
|
117
120
|
ellipsis = valueTypeProps.ellipsis,
|
|
118
|
-
|
|
121
|
+
_valueTypeProps$empty = valueTypeProps.emptyNode,
|
|
122
|
+
emptyNode = _valueTypeProps$empty === void 0 ? "-" : _valueTypeProps$empty;
|
|
119
123
|
var tableVal = getTableVal(config, itemData);
|
|
120
124
|
return jsxRuntime.jsxs(Paragraph, {
|
|
121
125
|
type: type,
|
package/package.json
CHANGED
|
@@ -8,8 +8,12 @@ const { Link, Paragraph } = Typography;
|
|
|
8
8
|
const getTableVal = (config: ConfigItemModal, itemData: any) => {
|
|
9
9
|
const { dataIndex } = config;
|
|
10
10
|
const tableDataIndex = dataIndex as string;
|
|
11
|
-
const val=itemData[tableDataIndex]
|
|
12
|
-
|
|
11
|
+
const val=itemData[tableDataIndex];
|
|
12
|
+
if (typeof val==="undefined"||val===null){
|
|
13
|
+
return val;
|
|
14
|
+
}
|
|
15
|
+
const relVal=val?.toString();
|
|
16
|
+
return !!relVal?relVal:null;
|
|
13
17
|
};
|
|
14
18
|
const dateRender = (config: ConfigItemModal, itemData: any) => {
|
|
15
19
|
const { valueTypeProps = {} } = config;
|
|
@@ -87,7 +91,7 @@ const linkRender = (config: ConfigItemModal, itemData: any) => {
|
|
|
87
91
|
};
|
|
88
92
|
const textRender = (config: ConfigItemModal, itemData: any) => {
|
|
89
93
|
const { valueTypeProps = {} } = config;
|
|
90
|
-
const { addonBefore, addonAfter, type, ellipsis ,emptyNode} = valueTypeProps;
|
|
94
|
+
const { addonBefore, addonAfter, type, ellipsis ,emptyNode="-"} = valueTypeProps;
|
|
91
95
|
const tableVal = getTableVal(config, itemData);
|
|
92
96
|
return (
|
|
93
97
|
<Paragraph
|