@vtx/cs-map-layer 1.0.19 → 1.0.21
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.
|
@@ -15,6 +15,7 @@ declare namespace CustomContent {
|
|
|
15
15
|
customButton: PropTypes.Requireable<NonNullable<PropTypes.ReactElementLike | ((...args: any[]) => any) | null | undefined>>;
|
|
16
16
|
popup: PropTypes.Requireable<object>;
|
|
17
17
|
detail: PropTypes.Requireable<object>;
|
|
18
|
+
extraKeyParamList: PropTypes.Requireable<any[]>;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
export default CustomContent;
|
|
@@ -21,7 +21,9 @@ function CustomContent(props) {
|
|
|
21
21
|
var _item$keyParamList, _item$keyParamList2, _item$factorValuesLis, _item$factorValuesLis2;
|
|
22
22
|
var _onClick = props.onClick,
|
|
23
23
|
facilityDetail = props.facilityDetail,
|
|
24
|
-
dark = props.dark
|
|
24
|
+
dark = props.dark,
|
|
25
|
+
_props$extraKeyParamL = props.extraKeyParamList,
|
|
26
|
+
extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL;
|
|
25
27
|
// !-解决因子不能及时更新问题
|
|
26
28
|
var _useState = useState(0),
|
|
27
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -144,7 +146,12 @@ function CustomContent(props) {
|
|
|
144
146
|
}, v.name || ''), /*#__PURE__*/React.createElement("span", null, v.unit ? "\uFF08".concat(v.unit, "\uFF09") : '', ":"), /*#__PURE__*/React.createElement("span", {
|
|
145
147
|
className: classnames(handleClassName('keyIndicators-item-left-value'))
|
|
146
148
|
}, v.value || v.value == 0 ? v.value : '')));
|
|
147
|
-
})) : null)
|
|
149
|
+
})) : null, extraKeyParamList !== null && extraKeyParamList !== void 0 && extraKeyParamList.length ? extraKeyParamList === null || extraKeyParamList === void 0 ? void 0 : extraKeyParamList.map(function (item) {
|
|
150
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
151
|
+
key: item.name,
|
|
152
|
+
className: item.className || ''
|
|
153
|
+
}, item.name && /*#__PURE__*/React.createElement("span", null, item.name || '', "\xA0: \xA0"), item.value || item.value === 0 ? item.value : '', item.unit || '');
|
|
154
|
+
}) : null));
|
|
148
155
|
}
|
|
149
156
|
CustomContent.propTypes = {
|
|
150
157
|
dark: PropTypes.bool,
|
|
@@ -158,6 +165,7 @@ CustomContent.propTypes = {
|
|
|
158
165
|
valueField: PropTypes.string,
|
|
159
166
|
customButton: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
|
|
160
167
|
popup: PropTypes.object,
|
|
161
|
-
detail: PropTypes.object
|
|
168
|
+
detail: PropTypes.object,
|
|
169
|
+
extraKeyParamList: PropTypes.array
|
|
162
170
|
};
|
|
163
171
|
export default CustomContent;
|
|
@@ -14,7 +14,9 @@ var FacilityTemplate = function FacilityTemplate(props) {
|
|
|
14
14
|
var feature = props.feature,
|
|
15
15
|
showModal = props.showModal,
|
|
16
16
|
valueField = props.valueField,
|
|
17
|
-
customKeys = props.customKeys
|
|
17
|
+
customKeys = props.customKeys,
|
|
18
|
+
_props$extraKeyParamL = props.extraKeyParamList,
|
|
19
|
+
extraKeyParamList = _props$extraKeyParamL === void 0 ? [] : _props$extraKeyParamL;
|
|
18
20
|
var _useState = useState([]),
|
|
19
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
22
|
list = _useState2[0],
|
|
@@ -85,6 +87,7 @@ var FacilityTemplate = function FacilityTemplate(props) {
|
|
|
85
87
|
spinning: loading,
|
|
86
88
|
size: "small"
|
|
87
89
|
}, /*#__PURE__*/React.createElement(CustomContent, {
|
|
90
|
+
extraKeyParamList: extraKeyParamList,
|
|
88
91
|
dark: true,
|
|
89
92
|
facilityDetail: facilityDetail,
|
|
90
93
|
onClick: function onClick() {
|