@zgfe/business-lib 1.2.50-alpha.10 → 1.2.50-alpha.3

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.
@@ -27,7 +27,6 @@ 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;
31
30
  var refForm = useRef();
32
31
  var _useState = useState(false),
33
32
  _useState2 = _slicedToArray(_useState, 2),
@@ -173,11 +172,8 @@ var BizAddToPanel = function BizAddToPanel(props) {
173
172
  var showBox = function showBox(type, module) {
174
173
  if (module && ['duration_avg', 'active', 'add', 'duration'].includes(module)) {
175
174
  var _props$styleOptions, _props$styleOptions$f, _props$params;
176
- var options = (_props$styleOptions = props.styleOptions) === null || _props$styleOptions === void 0 ? void 0 : (_props$styleOptions$f = _props$styleOptions.find(function (item) {
177
- return RegExp(item.value, 'g').test(type);
178
- })) === null || _props$styleOptions$f === void 0 ? void 0 : _props$styleOptions$f.optionList;
179
175
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
180
- label: "\u9644\u52A0",
176
+ label: "\u663E\u793A",
181
177
  name: "extendTarget",
182
178
  colon: false,
183
179
  rules: [{
@@ -185,9 +181,11 @@ var BizAddToPanel = function BizAddToPanel(props) {
185
181
  message: '请选择显示'
186
182
  }]
187
183
  }, /*#__PURE__*/React.createElement(WholeChart, {
188
- options: options
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, {
190
- label: "\xA0\xA0\xA0\xA0\xA0\xA0",
184
+ options: (_props$styleOptions = props.styleOptions) === null || _props$styleOptions === void 0 ? void 0 : (_props$styleOptions$f = _props$styleOptions.find(function (item) {
185
+ return item.value == type;
186
+ })) === null || _props$styleOptions$f === void 0 ? void 0 : _props$styleOptions$f.optionList
187
+ })), ((_props$params = props.params) === null || _props$params === void 0 ? void 0 : _props$params.dimension) && /*#__PURE__*/React.createElement(Form.Item, {
188
+ label: "",
191
189
  name: "showList",
192
190
  colon: false,
193
191
  rules: [{
@@ -241,10 +239,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
241
239
  }, /*#__PURE__*/React.createElement(Form, {
242
240
  ref: refForm,
243
241
  onFinish: onSubmit,
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),
242
+ initialValues: props.defaultValue,
248
243
  requiredMark: false
249
244
  }, /*#__PURE__*/React.createElement(Form.Item, {
250
245
  label: "\u770B\u677F",
@@ -312,10 +307,10 @@ var BizAddToPanel = function BizAddToPanel(props) {
312
307
  noStyle: true,
313
308
  shouldUpdate: true
314
309
  }, function (_ref) {
315
- var _props$params3;
310
+ var _props$params2;
316
311
  var getFieldValue = _ref.getFieldValue;
317
312
  var type = getFieldValue('chartType');
318
- return showBox(type, (_props$params3 = props.params) === null || _props$params3 === void 0 ? void 0 : _props$params3.module);
313
+ return showBox(type, (_props$params2 = props.params) === null || _props$params2 === void 0 ? void 0 : _props$params2.module);
319
314
  })));
320
315
  };
321
316
  BizAddToPanel.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.2.50-alpha.10",
3
+ "version": "1.2.50-alpha.3",
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": "d037a476c8853f407e0eef5c1f1ca8ba301746c0",
58
+ "gitHead": "9948fcd9232fe14e9eb2337390350275ca6428a2",
59
59
  "gitHooks": {
60
60
  "pre-commit": "lint-staged"
61
61
  }