@giteeteam/apps-team-components 1.9.7 → 1.9.8-alpha.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.
|
@@ -17,14 +17,14 @@ const UserGroupReadView = props => {
|
|
|
17
17
|
setValue(Array.isArray(propsValue) ? propsValue : ((_a = [propsValue]) !== null && _a !== void 0 ? _a : []));
|
|
18
18
|
}, [propsValue, setValue]);
|
|
19
19
|
const showValue = useMemo(() => {
|
|
20
|
-
var _a
|
|
20
|
+
var _a;
|
|
21
21
|
let showValue = null;
|
|
22
22
|
if (mode === 'multiple') {
|
|
23
23
|
if (value && Array.isArray(value)) {
|
|
24
24
|
showValue = value.reduce((showValue, val) => {
|
|
25
|
-
var _a;
|
|
25
|
+
var _a, _b;
|
|
26
26
|
const opt = options === null || options === void 0 ? void 0 : options.filter(item => item.value === handleValue(val));
|
|
27
|
-
const showLabel = ((_a = opt === null || opt === void 0 ? void 0 : opt[0]) === null || _a === void 0 ? void 0 : _a.label) || (val === null || val === void 0 ? void 0 : val.label);
|
|
27
|
+
const showLabel = ((_a = opt === null || opt === void 0 ? void 0 : opt[0]) === null || _a === void 0 ? void 0 : _a.pathLabel) || ((_b = opt === null || opt === void 0 ? void 0 : opt[0]) === null || _b === void 0 ? void 0 : _b.label) || (val === null || val === void 0 ? void 0 : val.label);
|
|
28
28
|
if (showLabel) {
|
|
29
29
|
if (showValue) {
|
|
30
30
|
return showValue + ',' + showLabel;
|
|
@@ -40,10 +40,11 @@ const UserGroupReadView = props => {
|
|
|
40
40
|
else {
|
|
41
41
|
if (value && Array.isArray(value) && value[0]) {
|
|
42
42
|
if (isObject(value[0])) {
|
|
43
|
-
showValue = value[0].label;
|
|
43
|
+
showValue = value[0].pathLabel || value[0].label;
|
|
44
44
|
}
|
|
45
45
|
else if (options && Array.isArray(options)) {
|
|
46
|
-
|
|
46
|
+
const findValue = (_a = options.filter(item => item.value === value[0])) === null || _a === void 0 ? void 0 : _a[0];
|
|
47
|
+
showValue = (findValue === null || findValue === void 0 ? void 0 : findValue.pathLabel) || (findValue === null || findValue === void 0 ? void 0 : findValue.label);
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|