@zgfe/business-lib 1.2.48-plat.13 → 1.2.48-plat.15

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.
@@ -10,6 +10,10 @@ declare const BizPlatformSelector: React.FC<{
10
10
  key: number;
11
11
  value: string;
12
12
  };
13
+ value?: {
14
+ key: number;
15
+ value: string;
16
+ };
13
17
  valueOption?: platItemProp[];
14
18
  }>;
15
19
  export default BizPlatformSelector;
@@ -1,9 +1,23 @@
1
- import React from 'react';
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState, useEffect } from 'react';
2
8
  import { BizSelect } from '@zgfe/business-lib';
3
9
  import { platformOption } from './util';
4
10
  import './styles/index.less';
5
11
  var BizPlatformSelector = function BizPlatformSelector(props) {
6
12
  var classPrefix = 'biz-platform-selector';
13
+ var _useState = useState(),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ currentValue = _useState2[0],
16
+ setCurrentValue = _useState2[1];
17
+ useEffect(function () {
18
+ console.log('props-value', props.value);
19
+ setCurrentValue(props.value);
20
+ }, [props.value]);
7
21
  return /*#__PURE__*/React.createElement("div", {
8
22
  className: classPrefix
9
23
  }, /*#__PURE__*/React.createElement(BizSelect, {
@@ -12,6 +26,7 @@ var BizPlatformSelector = function BizPlatformSelector(props) {
12
26
  overlayWidth: 134,
13
27
  keyField: "key",
14
28
  labelField: "value",
29
+ value: currentValue,
15
30
  defaultValue: props.defaultValue ? props.defaultValue : {
16
31
  value: '全部平台',
17
32
  key: 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.2.48-plat.13",
3
+ "version": "1.2.48-plat.15",
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": "1b701a79c1651dfdc256705b00c6f80f05442549",
58
+ "gitHead": "df2ea9795cf5e58a742ed63ed18e0e94b2230952",
59
59
  "gitHooks": {
60
60
  "pre-commit": "lint-staged"
61
61
  }