@nutui/nutui-react 1.2.3-beta.3 → 1.2.3-beta.4

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.
@@ -104,6 +104,7 @@ var Infiniteloading = function Infiniteloading(props) {
104
104
 
105
105
  setIsInfiniting(true);
106
106
  loadMore && loadMore(infiniteDone);
107
+ return true;
107
108
  });
108
109
  };
109
110
 
@@ -155,7 +156,7 @@ var Infiniteloading = function Infiniteloading(props) {
155
156
  };
156
157
 
157
158
  var requestAniFrame = function requestAniFrame() {
158
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (callback) {
159
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function fn(callback) {
159
160
  window.setTimeout(callback, 1000 / 60);
160
161
  };
161
162
  };
@@ -197,7 +198,7 @@ var Infiniteloading = function Infiniteloading(props) {
197
198
 
198
199
  beforeScrollTop.current = resScrollTop;
199
200
  scrollChange && scrollChange(resScrollTop);
200
- return offsetDistance <= threshold && direction == 'down';
201
+ return offsetDistance <= threshold && direction === 'down';
201
202
  };
202
203
 
203
204
  return React__default.createElement("div", _objectSpread({
@@ -217,7 +218,7 @@ var Infiniteloading = function Infiniteloading(props) {
217
218
  name: pullIcon
218
219
  }), React__default.createElement("span", {
219
220
  className: "top-text"
220
- }, locale.infiniteloading.pullRefreshText || pullTxt))), React__default.createElement("div", {
221
+ }, pullTxt || locale.infiniteloading.pullRefreshText))), React__default.createElement("div", {
221
222
  className: "nut-infinite-container"
222
223
  }, children), React__default.createElement("div", {
223
224
  className: "nut-infinite-bottom"
@@ -228,9 +229,9 @@ var Infiniteloading = function Infiniteloading(props) {
228
229
  name: loadIcon
229
230
  }), React__default.createElement("div", {
230
231
  className: "bottom-text"
231
- }, locale.infiniteloading.loadText || loadTxt)) : !hasMore && React__default.createElement("div", {
232
+ }, loadTxt || locale.infiniteloading.loadText)) : !hasMore && React__default.createElement("div", {
232
233
  className: "tips"
233
- }, locale.infiniteloading.loadMoreText || loadMoreTxt)));
234
+ }, loadMoreTxt || locale.infiniteloading.loadMoreText)));
234
235
  };
235
236
 
236
237
  Infiniteloading.defaultProps = defaultProps;
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["title", "desc", "tips", "visible", "modelValue", "errorMsg", "noButton", "closeOnClickOverlay", "length", "style", "className", "change", "onOk", "onTips", "onCancel", "onClose", "complete"];
5
+ var _excluded = ["title", "desc", "tips", "visible", "modelValue", "errorMsg", "noButton", "closeOnClickOverlay", "length", "style", "className", "onChange", "onOk", "onTips", "onCancel", "onClose", "onComplete"];
6
6
 
7
7
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
8
 
@@ -15,9 +15,9 @@ import Icon from './Icon.js';
15
15
  import { useConfig } from './ConfigProvider.js';
16
16
  import '@bem-react/classname';
17
17
  var defaultProps = {
18
- title: '请输入密码',
19
- desc: '您使用了虚拟资产,请进行验证',
20
- tips: '忘记密码',
18
+ title: '',
19
+ desc: '',
20
+ tips: '',
21
21
  visible: false,
22
22
  modelValue: '',
23
23
  errorMsg: '',
@@ -25,12 +25,12 @@ var defaultProps = {
25
25
  closeOnClickOverlay: true,
26
26
  length: 6,
27
27
  className: '',
28
- change: function change(value) {},
28
+ onChange: function onChange(value) {},
29
29
  onOk: function onOk(value) {},
30
30
  onCancel: function onCancel() {},
31
31
  onClose: function onClose() {},
32
32
  onTips: function onTips() {},
33
- complete: function complete(value) {}
33
+ onComplete: function onComplete(value) {}
34
34
  };
35
35
 
36
36
  var ShortPassword = function ShortPassword(props) {
@@ -48,12 +48,12 @@ var ShortPassword = function ShortPassword(props) {
48
48
  length = props.length,
49
49
  style = props.style,
50
50
  className = props.className,
51
- change = props.change,
51
+ onChange = props.onChange,
52
52
  onOk = props.onOk,
53
53
  onTips = props.onTips,
54
54
  onCancel = props.onCancel,
55
55
  onClose = props.onClose,
56
- complete = props.complete,
56
+ onComplete = props.onComplete,
57
57
  reset = _objectWithoutProperties(props, _excluded);
58
58
 
59
59
  var b = cn('shortpassword');
@@ -82,7 +82,7 @@ var ShortPassword = function ShortPassword(props) {
82
82
  setInnerVisible(visible);
83
83
  }, [visible]);
84
84
  useEffect(function () {
85
- if (modelValue) {
85
+ if (typeof modelValue !== 'undefined') {
86
86
  setInputValue(modelValue);
87
87
  }
88
88
  }, [modelValue]);
@@ -97,10 +97,10 @@ var ShortPassword = function ShortPassword(props) {
97
97
  setInputValue(inputValue);
98
98
 
99
99
  if (String(inputValue).length === comLen) {
100
- complete && complete(inputValue);
100
+ onComplete && onComplete(inputValue);
101
101
  }
102
102
 
103
- change && change(inputValue);
103
+ onChange && onChange(inputValue);
104
104
  };
105
105
 
106
106
  var systemStyle = function systemStyle() {
@@ -109,18 +109,23 @@ var ShortPassword = function ShortPassword(props) {
109
109
 
110
110
  var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
111
111
 
112
+ var style = {};
113
+ console.log(isIOS, isAndroid);
114
+
112
115
  if (isIOS) {
113
- return {
116
+ style = {
114
117
  paddingRight: '1200px'
115
118
  };
116
119
  }
117
120
 
118
121
  if (isAndroid) {
119
- return {
122
+ style = {
120
123
  opacity: 0,
121
124
  zIndex: 10
122
125
  };
123
126
  }
127
+
128
+ return style;
124
129
  };
125
130
 
126
131
  var focus = function focus() {
@@ -149,9 +154,9 @@ var ShortPassword = function ShortPassword(props) {
149
154
  style: _objectSpread({}, style)
150
155
  }, reset), React__default.createElement("div", {
151
156
  className: b('title')
152
- }, locale.shortpassword.title || title), React__default.createElement("div", {
157
+ }, title || locale.shortpassword.title), React__default.createElement("div", {
153
158
  className: b('subtitle')
154
- }, locale.shortpassword.desc || desc), React__default.createElement("div", {
159
+ }, desc || locale.shortpassword.desc), React__default.createElement("div", {
155
160
  className: b('input')
156
161
  }, React__default.createElement("input", {
157
162
  ref: textInput,
@@ -181,7 +186,7 @@ var ShortPassword = function ShortPassword(props) {
181
186
  className: b('message')
182
187
  }, React__default.createElement("div", {
183
188
  className: b('message__error')
184
- }, errorMsg), tips ? React__default.createElement("div", {
189
+ }, errorMsg), tips || locale.shortpassword.tips ? React__default.createElement("div", {
185
190
  className: b('message__forget')
186
191
  }, React__default.createElement(Icon, {
187
192
  className: "icon",
@@ -189,7 +194,7 @@ var ShortPassword = function ShortPassword(props) {
189
194
  name: "tips"
190
195
  }), React__default.createElement("div", {
191
196
  onClick: onTips
192
- }, locale.shortpassword.tips || tips)) : null), !noButton ? React__default.createElement("div", {
197
+ }, tips || locale.shortpassword.tips)) : null), !noButton ? React__default.createElement("div", {
193
198
  className: b('footer')
194
199
  }, React__default.createElement("div", {
195
200
  className: b('footer__cancel'),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:40 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.4 Fri Aug 19 2022 09:34:50 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:40 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.4 Fri Aug 19 2022 09:34:50 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:40 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.4 Fri Aug 19 2022 09:34:50 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:40 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.4 Fri Aug 19 2022 09:34:50 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:40 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.4 Fri Aug 19 2022 09:34:50 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:12 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.4 Fri Aug 19 2022 09:34:33 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -6426,9 +6426,9 @@ const Rate = (props) => {
6426
6426
  Rate.defaultProps = defaultProps$H;
6427
6427
  Rate.displayName = "NutRate";
6428
6428
  const defaultProps$G = {
6429
- title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
6430
- desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
6431
- tips: "\u5FD8\u8BB0\u5BC6\u7801",
6429
+ title: "",
6430
+ desc: "",
6431
+ tips: "",
6432
6432
  visible: false,
6433
6433
  modelValue: "",
6434
6434
  errorMsg: "",
@@ -6436,7 +6436,7 @@ const defaultProps$G = {
6436
6436
  closeOnClickOverlay: true,
6437
6437
  length: 6,
6438
6438
  className: "",
6439
- change: (value) => {
6439
+ onChange: (value) => {
6440
6440
  },
6441
6441
  onOk: (value) => {
6442
6442
  },
@@ -6446,7 +6446,7 @@ const defaultProps$G = {
6446
6446
  },
6447
6447
  onTips: () => {
6448
6448
  },
6449
- complete: (value) => {
6449
+ onComplete: (value) => {
6450
6450
  }
6451
6451
  };
6452
6452
  const ShortPassword = (props) => {
@@ -6463,12 +6463,12 @@ const ShortPassword = (props) => {
6463
6463
  length,
6464
6464
  style,
6465
6465
  className,
6466
- change,
6466
+ onChange,
6467
6467
  onOk,
6468
6468
  onTips,
6469
6469
  onCancel,
6470
6470
  onClose,
6471
- complete,
6471
+ onComplete,
6472
6472
  ...reset
6473
6473
  } = props;
6474
6474
  const b2 = cn("shortpassword");
@@ -6483,7 +6483,7 @@ const ShortPassword = (props) => {
6483
6483
  setInnerVisible(visible);
6484
6484
  }, [visible]);
6485
6485
  useEffect(() => {
6486
- if (modelValue) {
6486
+ if (typeof modelValue !== "undefined") {
6487
6487
  setInputValue(modelValue);
6488
6488
  }
6489
6489
  }, [modelValue]);
@@ -6494,25 +6494,28 @@ const ShortPassword = (props) => {
6494
6494
  }
6495
6495
  setInputValue(inputValue2);
6496
6496
  if (String(inputValue2).length === comLen) {
6497
- complete && complete(inputValue2);
6497
+ onComplete && onComplete(inputValue2);
6498
6498
  }
6499
- change && change(inputValue2);
6499
+ onChange && onChange(inputValue2);
6500
6500
  };
6501
6501
  const systemStyle = () => {
6502
6502
  const u = navigator.userAgent;
6503
6503
  const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
6504
6504
  const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
6505
+ let style2 = {};
6506
+ console.log(isIOS, isAndroid);
6505
6507
  if (isIOS) {
6506
- return {
6508
+ style2 = {
6507
6509
  paddingRight: "1200px"
6508
6510
  };
6509
6511
  }
6510
6512
  if (isAndroid) {
6511
- return {
6513
+ style2 = {
6512
6514
  opacity: 0,
6513
6515
  zIndex: 10
6514
6516
  };
6515
6517
  }
6518
+ return style2;
6516
6519
  };
6517
6520
  const focus = () => {
6518
6521
  if (textInput.current) {
@@ -6539,9 +6542,9 @@ const ShortPassword = (props) => {
6539
6542
  ...reset
6540
6543
  }, /* @__PURE__ */ React__default.createElement("div", {
6541
6544
  className: b2("title")
6542
- }, locale.shortpassword.title || title), /* @__PURE__ */ React__default.createElement("div", {
6545
+ }, title || locale.shortpassword.title), /* @__PURE__ */ React__default.createElement("div", {
6543
6546
  className: b2("subtitle")
6544
- }, locale.shortpassword.desc || desc), /* @__PURE__ */ React__default.createElement("div", {
6547
+ }, desc || locale.shortpassword.desc), /* @__PURE__ */ React__default.createElement("div", {
6545
6548
  className: b2("input")
6546
6549
  }, /* @__PURE__ */ React__default.createElement("input", {
6547
6550
  ref: textInput,
@@ -6567,7 +6570,7 @@ const ShortPassword = (props) => {
6567
6570
  className: b2("message")
6568
6571
  }, /* @__PURE__ */ React__default.createElement("div", {
6569
6572
  className: b2("message__error")
6570
- }, errorMsg2), tips ? /* @__PURE__ */ React__default.createElement("div", {
6573
+ }, errorMsg2), tips || locale.shortpassword.tips ? /* @__PURE__ */ React__default.createElement("div", {
6571
6574
  className: b2("message__forget")
6572
6575
  }, /* @__PURE__ */ React__default.createElement(Icon, {
6573
6576
  className: "icon",
@@ -6575,7 +6578,7 @@ const ShortPassword = (props) => {
6575
6578
  name: "tips"
6576
6579
  }), /* @__PURE__ */ React__default.createElement("div", {
6577
6580
  onClick: onTips
6578
- }, locale.shortpassword.tips || tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", {
6581
+ }, tips || locale.shortpassword.tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", {
6579
6582
  className: b2("footer")
6580
6583
  }, /* @__PURE__ */ React__default.createElement("div", {
6581
6584
  className: b2("footer__cancel"),
@@ -12529,6 +12532,7 @@ const Infiniteloading = (props) => {
12529
12532
  }
12530
12533
  setIsInfiniting(true);
12531
12534
  loadMore && loadMore(infiniteDone);
12535
+ return true;
12532
12536
  });
12533
12537
  };
12534
12538
  const infiniteDone = () => {
@@ -12572,7 +12576,7 @@ const Infiniteloading = (props) => {
12572
12576
  }
12573
12577
  };
12574
12578
  const requestAniFrame2 = () => {
12575
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(callback) {
12579
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function fn(callback) {
12576
12580
  window.setTimeout(callback, 1e3 / 60);
12577
12581
  };
12578
12582
  };
@@ -12604,7 +12608,7 @@ const Infiniteloading = (props) => {
12604
12608
  }
12605
12609
  beforeScrollTop.current = resScrollTop;
12606
12610
  scrollChange && scrollChange(resScrollTop);
12607
- return offsetDistance <= threshold && direction == "down";
12611
+ return offsetDistance <= threshold && direction === "down";
12608
12612
  };
12609
12613
  return /* @__PURE__ */ React__default.createElement("div", {
12610
12614
  className: classes,
@@ -12624,7 +12628,7 @@ const Infiniteloading = (props) => {
12624
12628
  name: pullIcon
12625
12629
  }), /* @__PURE__ */ React__default.createElement("span", {
12626
12630
  className: "top-text"
12627
- }, locale.infiniteloading.pullRefreshText || pullTxt))), /* @__PURE__ */ React__default.createElement("div", {
12631
+ }, pullTxt || locale.infiniteloading.pullRefreshText))), /* @__PURE__ */ React__default.createElement("div", {
12628
12632
  className: "nut-infinite-container"
12629
12633
  }, children), /* @__PURE__ */ React__default.createElement("div", {
12630
12634
  className: "nut-infinite-bottom"
@@ -12635,9 +12639,9 @@ const Infiniteloading = (props) => {
12635
12639
  name: loadIcon
12636
12640
  }), /* @__PURE__ */ React__default.createElement("div", {
12637
12641
  className: "bottom-text"
12638
- }, locale.infiniteloading.loadText || loadTxt)) : !hasMore && /* @__PURE__ */ React__default.createElement("div", {
12642
+ }, loadTxt || locale.infiniteloading.loadText)) : !hasMore && /* @__PURE__ */ React__default.createElement("div", {
12639
12643
  className: "tips"
12640
- }, locale.infiniteloading.loadMoreText || loadMoreTxt)));
12644
+ }, loadMoreTxt || locale.infiniteloading.loadMoreText)));
12641
12645
  };
12642
12646
  Infiniteloading.defaultProps = defaultProps$x;
12643
12647
  Infiniteloading.displayName = "NutInfiniteloading";