@zgfe/business-lib 1.2.50-alpha.7 → 1.2.50-alpha.8
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/addToPanel/index.js +9 -6
- package/package.json +2 -2
package/es/addToPanel/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import _ from 'lodash';
|
|
|
27
27
|
import WholeChart from './components/wholeChart';
|
|
28
28
|
export var classPrefix = 'biz-addtopanel';
|
|
29
29
|
var BizAddToPanel = function BizAddToPanel(props) {
|
|
30
|
+
var _props$params2;
|
|
30
31
|
var refForm = useRef();
|
|
31
32
|
var _useState = useState(false),
|
|
32
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -186,7 +187,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
186
187
|
}, /*#__PURE__*/React.createElement(WholeChart, {
|
|
187
188
|
options: options
|
|
188
189
|
})), ((_props$params = props.params) === null || _props$params === void 0 ? void 0 : _props$params.dimension) && !RegExp('grid|map', 'g').test(type) && /*#__PURE__*/React.createElement(Form.Item, {
|
|
189
|
-
label: "\xA0\xA0",
|
|
190
|
+
label: "\xA0\xA0\xA0\xA0",
|
|
190
191
|
name: "showList",
|
|
191
192
|
colon: false,
|
|
192
193
|
rules: [{
|
|
@@ -194,8 +195,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
194
195
|
message: '请选择显示'
|
|
195
196
|
}]
|
|
196
197
|
}, /*#__PURE__*/React.createElement(RadioGroup, {
|
|
197
|
-
options: props.showOptions
|
|
198
|
-
value: "dynamic"
|
|
198
|
+
options: props.showOptions
|
|
199
199
|
})));
|
|
200
200
|
}
|
|
201
201
|
if (type && type.indexOf('number') !== -1) {
|
|
@@ -241,7 +241,10 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
241
241
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
242
242
|
ref: refForm,
|
|
243
243
|
onFinish: onSubmit,
|
|
244
|
-
initialValues: props.
|
|
244
|
+
initialValues: Object.assign(['duration_avg', 'active', 'add', 'duration'].includes((_props$params2 = props.params) === null || _props$params2 === void 0 ? void 0 : _props$params2.module) ? {
|
|
245
|
+
showList: 'dynamic',
|
|
246
|
+
chartType: 'line'
|
|
247
|
+
} : {}, props.defaultValue),
|
|
245
248
|
requiredMark: false
|
|
246
249
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
247
250
|
label: "\u770B\u677F",
|
|
@@ -309,10 +312,10 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
309
312
|
noStyle: true,
|
|
310
313
|
shouldUpdate: true
|
|
311
314
|
}, function (_ref) {
|
|
312
|
-
var _props$
|
|
315
|
+
var _props$params3;
|
|
313
316
|
var getFieldValue = _ref.getFieldValue;
|
|
314
317
|
var type = getFieldValue('chartType');
|
|
315
|
-
return showBox(type, (_props$
|
|
318
|
+
return showBox(type, (_props$params3 = props.params) === null || _props$params3 === void 0 ? void 0 : _props$params3.module);
|
|
316
319
|
})));
|
|
317
320
|
};
|
|
318
321
|
BizAddToPanel.defaultProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.50-alpha.
|
|
3
|
+
"version": "1.2.50-alpha.8",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "2b8a00c4172697b083323a6f4e398200967c6d73",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|