@quansitech/antd-admin 1.2.8 → 1.2.9
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.
|
@@ -24,7 +24,7 @@ export default function (props) {
|
|
|
24
24
|
var findValue = function findValue(options, value) {
|
|
25
25
|
for (var i = 0; i < options.length; i++) {
|
|
26
26
|
var option = options[i];
|
|
27
|
-
if (option.value
|
|
27
|
+
if (option.value == value) {
|
|
28
28
|
return [option.label];
|
|
29
29
|
} else if (option.children) {
|
|
30
30
|
return [option.label].concat(_toConsumableArray(findValue(option.children, value)));
|
|
@@ -33,8 +33,8 @@ export default function (props) {
|
|
|
33
33
|
};
|
|
34
34
|
useEffect(function () {
|
|
35
35
|
var _props$fieldProps, _props$fieldProps2, _props$fieldProps3;
|
|
36
|
-
setText(props.
|
|
37
|
-
var value = props.
|
|
36
|
+
setText(props.text);
|
|
37
|
+
var value = props.text;
|
|
38
38
|
var extraData;
|
|
39
39
|
if ((_props$fieldProps = props.fieldProps) !== null && _props$fieldProps !== void 0 && _props$fieldProps.extraRenderValue) {
|
|
40
40
|
extraData = props.fieldProps.extraRenderValue;
|
|
@@ -53,7 +53,7 @@ export default function (props) {
|
|
|
53
53
|
}
|
|
54
54
|
extraData = (_props$fieldProps$ext = props.fieldProps.extraRenderValues[index]) !== null && _props$fieldProps$ext !== void 0 ? _props$fieldProps$ext : [];
|
|
55
55
|
}
|
|
56
|
-
if (extraData) {
|
|
56
|
+
if (extraData && value && value != '-') {
|
|
57
57
|
setText(findValue(extraData.options, value).join(' / '));
|
|
58
58
|
return;
|
|
59
59
|
}
|