@nutui/nutui-react-taro 1.5.4 → 1.5.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # v1.5.5
2
+ `2023-05-17`
3
+
4
+ * :bug: fix: image src 设置空串时候样式错误,以及修复图片缓存后不出发加载事件 (#994) @oasis-cloud
5
+ * :bug: fix: input 设置 clearable 点击清除按钮,并不能清除输入框中的内容 (#992) @oasis-cloud
6
+ * :bug: fix: input 组件 ref 类型修复 (#1013) @oasis-cloud
7
+
8
+
1
9
  # v1.5.4
2
10
  `2023-05-10`
3
11
 
@@ -5,7 +13,7 @@
5
13
 
6
14
 
7
15
  # v1.5.3
8
- `2023-05-10`
16
+ `2023-04-28`
9
17
 
10
18
  * :sparkles: feat: dialog 增加函数式调用的demo @hanyuxinting
11
19
  * :bug: fix: 移除代码中无用的 console.log (#960) @oasis-cloud
package/dist/esm/Input.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as Input } from './input.taro-97af6c96.js';
1
+ import { I as Input } from './input.taro-77dcb8d9.js';
2
2
  import 'react';
3
3
  import './icon.taro-296a1bec.js';
4
4
  import './bem-350c1702.js';
@@ -147,9 +147,7 @@ const Input = forwardRef((props, ref) => {
147
147
  onChange && onChange(val, event);
148
148
  };
149
149
  const handleBlur = (event) => {
150
- setTimeout(() => {
151
- SetActive(false);
152
- }, 200);
150
+ SetActive(false);
153
151
  let val = event.target.value;
154
152
  if (maxlength && val.length > Number(maxlength)) {
155
153
  val = val.slice(0, Number(maxlength));
@@ -175,8 +173,10 @@ const Input = forwardRef((props, ref) => {
175
173
  return type;
176
174
  };
177
175
  const handleClear = (event) => {
178
- updateValue('');
179
- onClear && onClear('', event);
176
+ setTimeout(() => {
177
+ updateValue('');
178
+ onClear && onClear('', event);
179
+ }, 50);
180
180
  };
181
181
  return (React__default.createElement("div", { className: `${classes} ${className || ''}`, style: style, onClick: (e) => {
182
182
  onClick && onClick(e);
@@ -218,9 +218,17 @@ const Input = forwardRef((props, ref) => {
218
218
  }, onInput: (e) => {
219
219
  handleInput(e);
220
220
  } })),
221
- clearable && !readonly && active && inputValue.length > 0 ? (React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: "nut-input-clear", name: clearIcon, size: clearSize, onClick: (e) => {
221
+ React__default.createElement(Icon, { style: {
222
+ display: clearable &&
223
+ !readonly &&
224
+ active &&
225
+ inputValue.length > 0
226
+ ? 'inline-flex'
227
+ : 'none',
228
+ alignItems: 'center',
229
+ }, classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: "nut-input-clear", name: clearIcon, size: clearSize, onClick: (e) => {
222
230
  handleClear(e);
223
- } })) : null),
231
+ } })),
224
232
  rightIcon && rightIcon.length > 0 ? (React__default.createElement("div", { className: "nut-input-right-icon", onClick: (e) => {
225
233
  handleClickRightIcon(e);
226
234
  } },
@@ -34,7 +34,7 @@ export { C as Checkbox, a as CheckboxGroup } from './checkbox.taro-6120e3e3.js';
34
34
  export { D as DatePicker } from './datepicker.taro-477ad357.js';
35
35
  export { F as Form } from './form.taro-0b399b30.js';
36
36
  export { F as FormItem } from './formitem.taro-190a3326.js';
37
- export { I as Input } from './input.taro-97af6c96.js';
37
+ export { I as Input } from './input.taro-77dcb8d9.js';
38
38
  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';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.4 Wed May 10 2023 17:37:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 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.4 Wed May 10 2023 17:37:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 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.4 Wed May 10 2023 17:37:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 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.4 Wed May 10 2023 17:37:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 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.4 Wed May 10 2023 17:37:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 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.4 Wed May 10 2023 17:37:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.5 Wed May 17 2023 16:29:13 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */