component-sanzhizhou 1.3.3 → 1.3.5

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.
@@ -17,6 +17,7 @@ interface Props {
17
17
  label: React.ReactNode;
18
18
  value: Pay.BalanceType;
19
19
  }[];
20
+ defaultBalanceType?: Pay.BalanceType;
20
21
  }
21
22
  declare const PayRecharge: React.FC<Props>;
22
23
  export default PayRecharge;
@@ -20,7 +20,7 @@ var BaseDict = {
20
20
  }
21
21
  };
22
22
  var PayRecharge = function PayRecharge(_ref) {
23
- var _PayChannelList$filte, _balanceTypeOptions$;
23
+ var _PayChannelList$filte;
24
24
  var appId = _ref.appId,
25
25
  apiUrl = _ref.apiUrl,
26
26
  nickName = _ref.nickName,
@@ -41,7 +41,8 @@ var PayRecharge = function PayRecharge(_ref) {
41
41
  maxPrice = _ref$maxPrice === void 0 ? 5000 : _ref$maxPrice,
42
42
  onHandSuccess = _ref.onHandSuccess,
43
43
  env = _ref.env,
44
- balanceTypeOptions = _ref.balanceTypeOptions;
44
+ balanceTypeOptions = _ref.balanceTypeOptions,
45
+ defaultBalanceType = _ref.defaultBalanceType;
45
46
  var _useState = useState(((_PayChannelList$filte = PayChannelList.filter(function (items) {
46
47
  var itemList = items.childrenList.filter(function (item) {
47
48
  return item.name === defaultPayChannel;
@@ -56,7 +57,7 @@ var PayRecharge = function PayRecharge(_ref) {
56
57
  var _useState3 = useState({
57
58
  moneyAmount: defaultPrice,
58
59
  payChannel: defaultPayChannel,
59
- balanceType: balanceTypeOptions === null || balanceTypeOptions === void 0 || (_balanceTypeOptions$ = balanceTypeOptions[0]) === null || _balanceTypeOptions$ === void 0 ? void 0 : _balanceTypeOptions$.value
60
+ balanceType: defaultBalanceType
60
61
  }),
61
62
  _useState4 = _slicedToArray(_useState3, 2),
62
63
  formData = _useState4[0],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-sanzhizhou",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",