@nutui/nutui-react-taro 1.3.11 → 1.3.12-beta.1

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/dist/esm/Cell.js CHANGED
@@ -1,7 +1,6 @@
1
- import { C as Cell } from './cell.taro-6daf51a0.js';
2
- export { C as default } from './cell.taro-6daf51a0.js';
1
+ import { C as Cell } from './cell.taro-1f034402.js';
2
+ export { C as default } from './cell.taro-1f034402.js';
3
3
  import 'react';
4
- import 'react-router-dom';
5
4
  import '@tarojs/taro';
6
5
  import './bem-893ad28d.js';
7
6
  import '@bem-react/classname';
@@ -1,5 +1,5 @@
1
- import { T as TextArea } from './textarea.taro-388d1f90.js';
2
- export { T as default } from './textarea.taro-388d1f90.js';
1
+ import { T as TextArea } from './textarea.taro-0a85b8a5.js';
2
+ export { T as default } from './textarea.taro-0a85b8a5.js';
3
3
  import 'react';
4
4
  import './configprovider.taro-6c7b3056.js';
5
5
  import './zh-CN-14165629.js';
@@ -4,7 +4,6 @@ var _excluded = ["children", "click", "onClick", "title", "subTitle", "desc", "d
4
4
  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; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import React__default from 'react';
7
- import { useHistory } from 'react-router-dom';
8
7
  import Taro from '@tarojs/taro';
9
8
  import { c as cn } from './bem-893ad28d.js';
10
9
  import { I as Icon } from './icon.taro-1d0d4fb7.js';
@@ -52,21 +51,14 @@ var Cell = function Cell(props) {
52
51
  iconFontClassName = _defaultProps$props.iconFontClassName,
53
52
  rest = _objectWithoutProperties(_defaultProps$props, _excluded);
54
53
  var b = cn('cell');
55
- var history = useHistory();
56
54
  var handleClick = function handleClick(event) {
57
- click(event);
58
55
  onClick(event);
59
- if (to && history) {
60
- history[replace ? 'replace' : 'push'](to);
61
- } else if (url) {
62
- if (url.startsWith('https://') || url.startsWith('http://') || url.startsWith('//')) {
63
- replace ? window.location.replace(url) : window.location.href = url;
64
- } else {
65
- Taro.navigateTo({
66
- url: url
67
- });
68
- }
69
- }
56
+ var link = to || url;
57
+ replace ? Taro.redirectTo({
58
+ url: link
59
+ }) : Taro.navigateTo({
60
+ url: link
61
+ });
70
62
  };
71
63
  var baseStyle = {
72
64
  borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : "".concat(roundRadius, "px")
@@ -1,5 +1,5 @@
1
1
  export { B as Button } from './button.taro-4ce133b9.js';
2
- export { C as Cell } from './cell.taro-6daf51a0.js';
2
+ export { C as Cell } from './cell.taro-1f034402.js';
3
3
  export { C as CellGroup } from './cellgroup.taro-e094471c.js';
4
4
  export { I as Icon } from './icon.taro-1d0d4fb7.js';
5
5
  export { O as Overlay } from './overlay.taro-be45fed5.js';
@@ -37,7 +37,7 @@ export { R as Rate } from './rate.taro-10197384.js';
37
37
  export { C as CalendarItem } from './calendaritem.taro-3a12e7f2.js';
38
38
  export { P as Picker } from './picker.taro-f003b725.js';
39
39
  export { S as ShortPassword } from './shortpassword.taro-2e96ca22.js';
40
- export { T as TextArea } from './textarea.taro-388d1f90.js';
40
+ export { T as TextArea } from './textarea.taro-0a85b8a5.js';
41
41
  export { U as Uploader } from './uploader.taro-2e16bff6.js';
42
42
  export { C as Cascader } from './cascader.taro-8c9891b4.js';
43
43
  export { S as SearchBar } from './searchbar.taro-0d3c0081.js';
@@ -85,7 +85,6 @@ export { T as TimeDetail } from './timedetail.taro-519808cf.js';
85
85
  export { T as TimeSelect } from './timeselect.taro-8c4439a8.js';
86
86
  import 'react';
87
87
  import './typings-1c5f2628.js';
88
- import 'react-router-dom';
89
88
  import '@tarojs/taro';
90
89
  import './bem-893ad28d.js';
91
90
  import '@bem-react/classname';
@@ -1,3 +1,4 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
4
  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; }
@@ -40,17 +41,15 @@ var TextArea = function TextArea(props) {
40
41
  inputValue = _useState2[0],
41
42
  SetInputValue = _useState2[1];
42
43
  useEffect(function () {
43
- if (defaultValue) {
44
- var initValue = defaultValue;
45
- if (maxlength && initValue.length > Number(maxlength)) {
46
- initValue = initValue.substring(0, Number(maxlength));
47
- }
48
- SetInputValue(initValue);
44
+ var initValue = defaultValue;
45
+ if (initValue && maxlength && _toConsumableArray(initValue).length > Number(maxlength)) {
46
+ initValue = initValue.substring(0, Number(maxlength));
49
47
  }
48
+ SetInputValue(initValue);
50
49
  }, [defaultValue]);
51
50
  var textChange = function textChange(event) {
52
51
  var text = event.detail;
53
- if (maxlength && text.value.length > Number(maxlength)) {
52
+ if (maxlength && _toConsumableArray(text.value).length > Number(maxlength)) {
54
53
  text.value = text.value.substring(0, Number(maxlength));
55
54
  }
56
55
  SetInputValue(text.value);
@@ -96,7 +95,7 @@ var TextArea = function TextArea(props) {
96
95
  placeholder: placeholder || locale.placeholder
97
96
  }), limitshow ? React__default.createElement("div", {
98
97
  className: textareaBem('limit')
99
- }, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
98
+ }, _toConsumableArray(inputValue).length, "/", maxlength < 0 ? 0 : maxlength) : null);
100
99
  };
101
100
  TextArea.defaultProps = defaultProps;
102
101
  TextArea.displayName = 'NutTextArea';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:54 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.12-beta.1 Fri Nov 18 2022 20:36:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:54 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.12-beta.1 Fri Nov 18 2022 20:36:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:54 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.12-beta.1 Fri Nov 18 2022 20:36:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:54 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.12-beta.1 Fri Nov 18 2022 20:36:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.3.11 Wed Nov 16 2022 13:53:54 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.3.12-beta.1 Fri Nov 18 2022 20:36:47 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */