@chaoswise/business 0.0.4 → 0.0.5
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.
|
@@ -8,24 +8,27 @@ var DoUser = function DoUser(_ref) {
|
|
|
8
8
|
var belongComponentType = data.belongComponentType,
|
|
9
9
|
fieldWidth = data.fieldWidth,
|
|
10
10
|
tooltipContent = data.tooltipContent,
|
|
11
|
-
list = data.list
|
|
11
|
+
list = data.list,
|
|
12
|
+
componentType = data.componentType;
|
|
12
13
|
var gridShare = belongComponentType === "TABLE" ? '100%' : fieldWidth == 'WHOLE_LINE' ? '25%' : '50%';
|
|
13
14
|
var tooltipContentFuc = function tooltipContentFuc(item) {
|
|
14
15
|
return Object.keys(tooltipContent).map(function (key) {
|
|
15
16
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, tooltipContent[key], " ", item[key] || "", " "), /*#__PURE__*/React.createElement("br", null));
|
|
16
17
|
});
|
|
17
18
|
};
|
|
19
|
+
var nameKey = componentType === "USER_GROUP" ? 'groupName' : 'userName';
|
|
18
20
|
return /*#__PURE__*/React.createElement(Fragment, null, belongComponentType === "TABLE" ? /*#__PURE__*/React.createElement(TagShowMoreList, {
|
|
19
21
|
text: list,
|
|
20
22
|
tagCount: 1,
|
|
21
23
|
flag: "user",
|
|
22
|
-
nameKey:
|
|
24
|
+
nameKey: nameKey,
|
|
23
25
|
tooltipContentFuc: tooltipContentFuc
|
|
24
26
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
25
27
|
className: 'ci-detail-user'
|
|
26
28
|
}, (list || []).map(function (item) {
|
|
27
29
|
var _item$name;
|
|
28
30
|
return /*#__PURE__*/React.createElement(_Tooltip, {
|
|
31
|
+
placement: "topLeft",
|
|
29
32
|
title: tooltipContentFuc(item),
|
|
30
33
|
key: item.id
|
|
31
34
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -164,7 +164,7 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
164
164
|
expandable: true
|
|
165
165
|
},
|
|
166
166
|
list: [{
|
|
167
|
-
value: unit ? value + " " + unit : value
|
|
167
|
+
value: value ? unit ? value + " " + unit : value : '--'
|
|
168
168
|
}]
|
|
169
169
|
};
|
|
170
170
|
break;
|
|
@@ -262,6 +262,7 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
262
262
|
fieldWidth: fieldWidth,
|
|
263
263
|
tooltipContent: userTooltipContent || userTooltip,
|
|
264
264
|
belongComponentType: belongComponentType,
|
|
265
|
+
componentType: componentType,
|
|
265
266
|
list: (value ? Array.isArray(value) ? value : [value] : []).map(function (i) {
|
|
266
267
|
console.log(i, 'oooo');
|
|
267
268
|
i.id = i === null || i === void 0 ? void 0 : i.userId;
|
|
@@ -279,6 +280,7 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
279
280
|
fieldWidth: fieldWidth,
|
|
280
281
|
tooltipContent: userGroupTooltipContent || userGroupTooltip,
|
|
281
282
|
belongComponentType: belongComponentType,
|
|
283
|
+
componentType: componentType,
|
|
282
284
|
list: (value ? Array.isArray(value) ? value : [value] : []).map(function (i) {
|
|
283
285
|
i.id = i === null || i === void 0 ? void 0 : i.groupId;
|
|
284
286
|
i.name = i === null || i === void 0 ? void 0 : i.groupName;
|
|
@@ -322,7 +324,8 @@ export var getDataFunc = function getDataFunc(value, item, rest) {
|
|
|
322
324
|
break;
|
|
323
325
|
case "UNIT_BITMAP":
|
|
324
326
|
data = {
|
|
325
|
-
list: (value === null || value === void 0 ? void 0 : value.units) || []
|
|
327
|
+
list: (value === null || value === void 0 ? void 0 : value.units) || [],
|
|
328
|
+
handleClickChange: handleClickChange
|
|
326
329
|
};
|
|
327
330
|
break;
|
|
328
331
|
case "TABLE":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/business",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "业务组件库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
104
|
"license": "MIT",
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "780a8854dd697d36c4d9b7d83fd45cf7aabf082e"
|
|
106
106
|
}
|