@nutui/nutui-react-taro 1.5.5 → 1.5.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v1.5.6
2
+ `2023-05-24`
3
+
4
+ * :bug: fix: 修复Range 区间选择器,更新modelValue时,界面显示不正确的问题 #908 (#1033) @samber
5
+
6
+
1
7
  # v1.5.5
2
8
  `2023-05-17`
3
9
 
package/dist/esm/Audio.js CHANGED
@@ -1,10 +1,10 @@
1
- import { A as Audio } from './audio.taro-87ec8bf2.js';
1
+ import { A as Audio } from './audio.taro-307a3cb8.js';
2
2
  import 'react';
3
3
  import '@tarojs/taro';
4
4
  import './icon.taro-296a1bec.js';
5
5
  import './bem-350c1702.js';
6
6
  import '@bem-react/classname';
7
- import './range.taro-d8fc7656.js';
7
+ import './range.taro-5ab0e79e.js';
8
8
  import './useTouch-db24bb5c.js';
9
9
  import './useClientRect-1f8ed1fe.js';
10
10
  import './toast.taro-d6c14811.js';
package/dist/esm/Range.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as Range } from './range.taro-d8fc7656.js';
1
+ import { R as Range } from './range.taro-5ab0e79e.js';
2
2
  import 'react';
3
3
  import './useTouch-db24bb5c.js';
4
4
  import './useClientRect-1f8ed1fe.js';
@@ -1,7 +1,7 @@
1
1
  import React__default, { useState, useRef } from 'react';
2
2
  import { createInnerAudioContext } from '@tarojs/taro';
3
3
  import { I as Icon } from './icon.taro-296a1bec.js';
4
- import { R as Range } from './range.taro-d8fc7656.js';
4
+ import { R as Range } from './range.taro-5ab0e79e.js';
5
5
  import { B as Button } from './button.taro-9244d065.js';
6
6
  import { c as cn } from './bem-350c1702.js';
7
7
  import { u as useConfig } from './configprovider.taro-8d71eb49.js';
@@ -39,7 +39,7 @@ export { I as InputNumber } from './inputnumber.taro-91f65d17.js';
39
39
  export { N as NumberKeyboard } from './numberkeyboard.taro-1bc24744.js';
40
40
  export { P as Picker } from './picker.taro-0073eeaa.js';
41
41
  export { R as Radio, a as RadioGroup } from './radio.taro-a6eff96c.js';
42
- export { R as Range } from './range.taro-d8fc7656.js';
42
+ export { R as Range } from './range.taro-5ab0e79e.js';
43
43
  export { R as Rate } from './rate.taro-6cdf03bd.js';
44
44
  export { S as SearchBar } from './searchbar.taro-0c25927b.js';
45
45
  export { S as ShortPassword } from './shortpassword.taro-9ee034f7.js';
@@ -57,7 +57,7 @@ export { S as Switch } from './switch.taro-34ca8228.js';
57
57
  export { T as Toast } from './toast.taro-d6c14811.js';
58
58
  export { A as Animate } from './animate.taro-fb7986d6.js';
59
59
  export { A as AnimatingNumbers } from './animatingnumbers.taro-03e5d61d.js';
60
- export { A as Audio } from './audio.taro-87ec8bf2.js';
60
+ export { A as Audio } from './audio.taro-307a3cb8.js';
61
61
  export { A as Avatar } from './avatar.taro-3676f38f.js';
62
62
  export { A as AvatarGroup } from './avatargroup-f3574510.js';
63
63
  export { B as Badge } from './badge.taro-a4e59c11.js';
@@ -37,14 +37,19 @@ const Range = (props) => {
37
37
  SetShow(true);
38
38
  };
39
39
  useEffect(() => {
40
- if (typeof modelValue === 'number') {
41
- if (!range && (modelValue < min || modelValue > max)) {
40
+ if (!range && typeof modelValue === 'number') {
41
+ if (modelValue < min || modelValue > max) {
42
42
  SetInitValue(0);
43
43
  toastShow(`${modelValue} ${locale.range.rangeText}`);
44
44
  return;
45
45
  }
46
46
  SetInitValue(modelValue);
47
47
  }
48
+ else if (range &&
49
+ Array.isArray(modelValue) &&
50
+ [0, 1].every((i) => typeof modelValue[i] === 'number')) {
51
+ SetInitValue(modelValue);
52
+ }
48
53
  }, [modelValue]);
49
54
  useEffect(() => {
50
55
  if (marks) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:33:16 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:33:16 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:33:16 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:33:16 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:33:16 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:33:16 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  /*!
8
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:28:35 GMT+0800 (China Standard Time)
8
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:32:37 GMT+0800 (China Standard Time)
9
9
  * (c) 2023 @jdf2e.
10
10
  * Released under the MIT License.
11
11
  */
@@ -9100,13 +9100,15 @@ const Range = (props) => {
9100
9100
  SetShow(true);
9101
9101
  };
9102
9102
  useEffect(() => {
9103
- if (typeof modelValue === "number") {
9104
- if (!range && (modelValue < min || modelValue > max)) {
9103
+ if (!range && typeof modelValue === "number") {
9104
+ if (modelValue < min || modelValue > max) {
9105
9105
  SetInitValue(0);
9106
9106
  toastShow(`${modelValue} ${locale.range.rangeText}`);
9107
9107
  return;
9108
9108
  }
9109
9109
  SetInitValue(modelValue);
9110
+ } else if (range && Array.isArray(modelValue) && [0, 1].every((i) => typeof modelValue[i] === "number")) {
9111
+ SetInitValue(modelValue);
9110
9112
  }
9111
9113
  }, [modelValue]);
9112
9114
  useEffect(() => {
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:28:35 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:32:37 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -9116,13 +9116,15 @@ var __publicField = (obj, key, value) => {
9116
9116
  SetShow(true);
9117
9117
  };
9118
9118
  React.useEffect(() => {
9119
- if (typeof modelValue === "number") {
9120
- if (!range && (modelValue < min || modelValue > max)) {
9119
+ if (!range && typeof modelValue === "number") {
9120
+ if (modelValue < min || modelValue > max) {
9121
9121
  SetInitValue(0);
9122
9122
  toastShow(`${modelValue} ${locale.range.rangeText}`);
9123
9123
  return;
9124
9124
  }
9125
9125
  SetInitValue(modelValue);
9126
+ } else if (range && Array.isArray(modelValue) && [0, 1].every((i) => typeof modelValue[i] === "number")) {
9127
+ SetInitValue(modelValue);
9126
9128
  }
9127
9129
  }, [modelValue]);
9128
9130
  React.useEffect(() => {
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:28:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.6 Wed May 24 2023 17:32:59 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序",
5
5
  "title": "NutUI-React",
6
6
  "keywords": [