@nutui/nutui-react-taro 1.5.1-beta.0 → 1.5.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/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # v1.5.1
2
+ `2023-04-19`
3
+
4
+
5
+ * :bug: fix: 修改inputnumber微信小程序的带小数点的键盘 (#907) @junjun666
6
+ * :bug: fix: 修复uploader组件编译xhr报错的问题 (#916) @junjun666
7
+ * 🔨 chore: 开发编译兼容taro 3.6.5版本 (#911) @junjun666
8
+
9
+
10
+
1
11
  # v1.5.0
2
12
  `2023-04-12`
3
13
 
@@ -1,4 +1,4 @@
1
- import { B as Barrage } from './barrage.taro-80df08d3.js';
1
+ import { B as Barrage } from './barrage.taro-0495a1b2.js';
2
2
  import 'react';
3
3
  import '@tarojs/taro';
4
4
  import 'classnames';
@@ -1,4 +1,4 @@
1
- import { I as Infiniteloading } from './infiniteloading.taro-e66e3746.js';
1
+ import { I as Infiniteloading } from './infiniteloading.taro-183bccbf.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@tarojs/components';
@@ -1,4 +1,4 @@
1
- import { U as Uploader } from './uploader.taro-c615fd4c.js';
1
+ import { U as Uploader } from './uploader.taro-5a53aa33.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@tarojs/taro';
@@ -54,12 +54,12 @@ const InternalBarrage = (props, ref) => {
54
54
  query
55
55
  .select('.nut-barrage__body' + timeId.current)
56
56
  .boundingClientRect((rec) => {
57
- width = rec.width || 300;
57
+ width = (Array.isArray(rec) ? rec[0].width : rec.width) || 300;
58
58
  });
59
59
  query
60
60
  .select('.nut-barrage__item' + index)
61
61
  .boundingClientRect((recs) => {
62
- let height = recs.height;
62
+ let height = Array.isArray(recs) ? recs[0].width : recs.width;
63
63
  let nodeTop = (index % rows) * (height + top) + 20 + 'px';
64
64
  styleInfo(index, nodeTop, width);
65
65
  })
@@ -48,7 +48,9 @@ const Infiniteloading = (props) => {
48
48
  const parentElement = getParentElement('scroller');
49
49
  parentElement
50
50
  .boundingClientRect((rect) => {
51
- scrollHeight.current = rect.height;
51
+ scrollHeight.current = Array.isArray(rect)
52
+ ? rect[0].height
53
+ : rect.height;
52
54
  })
53
55
  .exec();
54
56
  };
@@ -44,12 +44,12 @@ 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';
46
46
  export { T as TextArea } from './textarea.taro-442e7350.js';
47
- export { U as Uploader } from './uploader.taro-c615fd4c.js';
47
+ export { U as Uploader } from './uploader.taro-5a53aa33.js';
48
48
  export { A as ActionSheet } from './actionsheet.taro-e6a51446.js';
49
49
  export { B as BackTop } from './backtop.taro-66394a36.js';
50
50
  export { B as Dialog } from './dialog.taro-a3267d29.js';
51
51
  export { D as Drag } from './drag.taro-79bb8744.js';
52
- export { I as Infiniteloading } from './infiniteloading.taro-e66e3746.js';
52
+ export { I as Infiniteloading } from './infiniteloading.taro-183bccbf.js';
53
53
  export { N as Notify } from './notify.taro-e17c6f82.js';
54
54
  export { P as PullToRefresh } from './pulltorefresh.taro-a294f656.js';
55
55
  export { S as Swipe } from './swipe.taro-ea35f07f.js';
@@ -84,7 +84,7 @@ export { V as Video } from './video-f1be8a91.js';
84
84
  export { V as VirtualList } from './virtuallist.taro-f0b0270d.js';
85
85
  export { W as WaterMark } from './watermark.taro-9ce2ae37.js';
86
86
  export { A as Address } from './address.taro-3a9b6396.js';
87
- export { B as Barrage } from './barrage.taro-80df08d3.js';
87
+ export { B as Barrage } from './barrage.taro-0495a1b2.js';
88
88
  export { C as Card } from './card.taro-e4c76dad.js';
89
89
  export { S as Signature } from './signature.taro-ec4e713b.js';
90
90
  export { T as TimeDetail } from './timedetail.taro-5b2f2269.js';
@@ -76,41 +76,36 @@ class UploaderTaro extends Upload {
76
76
  }
77
77
  uploadTaro(uploadFile, env) {
78
78
  const options = this.options;
79
- if (env === 'WEB') {
80
- this.upload();
79
+ if (options.beforeXhrUpload) {
80
+ options.beforeXhrUpload(uploadFile, options);
81
81
  }
82
82
  else {
83
- if (options.beforeXhrUpload) {
84
- options.beforeXhrUpload(uploadFile, options);
85
- }
86
- else {
87
- const uploadTask = uploadFile({
88
- url: options.url,
89
- filePath: options.taroFilePath,
90
- fileType: options.fileType,
91
- header: {
92
- 'Content-Type': 'multipart/form-data',
93
- ...options.headers,
94
- },
95
- formData: options.formData,
96
- name: options.name,
97
- success(response) {
98
- if (options.xhrState == response.statusCode) {
99
- options.onSuccess?.(response, options);
100
- }
101
- else {
102
- options.onFailure?.(response, options);
103
- }
104
- },
105
- fail(e) {
106
- options.onFailure?.(e, options);
107
- },
108
- });
109
- options.onStart?.(options);
110
- uploadTask.progress((res) => {
111
- options.onProgress?.(res, options);
112
- });
113
- }
83
+ const uploadTask = uploadFile({
84
+ url: options.url,
85
+ filePath: options.taroFilePath,
86
+ fileType: options.fileType,
87
+ header: {
88
+ 'Content-Type': 'multipart/form-data',
89
+ ...options.headers,
90
+ },
91
+ formData: options.formData,
92
+ name: options.name,
93
+ success(response) {
94
+ if (options.xhrState == response.statusCode) {
95
+ options.onSuccess?.(response, options);
96
+ }
97
+ else {
98
+ options.onFailure?.(response, options);
99
+ }
100
+ },
101
+ fail(e) {
102
+ options.onFailure?.(e, options);
103
+ },
104
+ });
105
+ options.onStart?.(options);
106
+ uploadTask.progress((res) => {
107
+ options.onProgress?.(res, options);
108
+ });
114
109
  }
115
110
  }
116
111
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.1-beta.0 Fri Apr 14 2023 09:52:45 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:21 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.1-beta.0 Fri Apr 14 2023 09:52:45 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:21 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.1-beta.0 Fri Apr 14 2023 09:52:45 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:21 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.1-beta.0 Fri Apr 14 2023 09:52:45 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:21 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.1-beta.0 Fri Apr 14 2023 09:52:45 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:21 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.1-beta.0 Fri Apr 14 2023 09:52:45 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:21 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.1-beta.0 Fri Apr 14 2023 09:51:56 GMT+0800 (China Standard Time)
8
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:21:35 GMT+0800 (China Standard Time)
9
9
  * (c) 2023 @jdf2e.
10
10
  * Released under the MIT License.
11
11
  */
@@ -10226,44 +10226,40 @@ class UploaderTaro extends Upload {
10226
10226
  uploadTaro(uploadFile2, env) {
10227
10227
  var _a;
10228
10228
  const options = this.options;
10229
- if (env === "WEB") {
10230
- this.upload();
10229
+ if (options.beforeXhrUpload) {
10230
+ options.beforeXhrUpload(uploadFile2, options);
10231
10231
  } else {
10232
- if (options.beforeXhrUpload) {
10233
- options.beforeXhrUpload(uploadFile2, options);
10234
- } else {
10235
- const uploadTask = uploadFile2({
10236
- url: options.url,
10237
- filePath: options.taroFilePath,
10238
- fileType: options.fileType,
10239
- header: {
10240
- "Content-Type": "multipart/form-data",
10241
- ...options.headers
10242
- },
10243
- //
10244
- formData: options.formData,
10245
- name: options.name,
10246
- success(response) {
10247
- var _a2, _b;
10248
- if (options.xhrState == response.statusCode) {
10249
- (_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
10250
- } else {
10251
- (_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
10252
- }
10253
- },
10254
- fail(e) {
10255
- var _a2;
10256
- (_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
10257
- }
10258
- });
10259
- (_a = options.onStart) == null ? void 0 : _a.call(options, options);
10260
- uploadTask.progress(
10261
- (res) => {
10262
- var _a2;
10263
- (_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
10232
+ const uploadTask = uploadFile2({
10233
+ url: options.url,
10234
+ filePath: options.taroFilePath,
10235
+ fileType: options.fileType,
10236
+ header: {
10237
+ "Content-Type": "multipart/form-data",
10238
+ ...options.headers
10239
+ },
10240
+ //
10241
+ formData: options.formData,
10242
+ name: options.name,
10243
+ success(response) {
10244
+ var _a2, _b;
10245
+ if (options.xhrState == response.statusCode) {
10246
+ (_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
10247
+ } else {
10248
+ (_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
10264
10249
  }
10265
- );
10266
- }
10250
+ },
10251
+ fail(e) {
10252
+ var _a2;
10253
+ (_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
10254
+ }
10255
+ });
10256
+ (_a = options.onStart) == null ? void 0 : _a.call(options, options);
10257
+ uploadTask.progress(
10258
+ (res) => {
10259
+ var _a2;
10260
+ (_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
10261
+ }
10262
+ );
10267
10263
  }
10268
10264
  }
10269
10265
  }
@@ -11265,7 +11261,7 @@ const Infiniteloading = (props) => {
11265
11261
  const getScrollHeight = () => {
11266
11262
  const parentElement = getParentElement("scroller");
11267
11263
  parentElement.boundingClientRect((rect) => {
11268
- scrollHeight.current = rect.height;
11264
+ scrollHeight.current = Array.isArray(rect) ? rect[0].height : rect.height;
11269
11265
  }).exec();
11270
11266
  };
11271
11267
  const getStyle = () => {
@@ -20931,10 +20927,10 @@ const InternalBarrage = (props, ref) => {
20931
20927
  setTimeout(() => {
20932
20928
  let width = 100;
20933
20929
  query.select(".nut-barrage__body" + timeId.current).boundingClientRect((rec) => {
20934
- width = rec.width || 300;
20930
+ width = (Array.isArray(rec) ? rec[0].width : rec.width) || 300;
20935
20931
  });
20936
20932
  query.select(".nut-barrage__item" + index2).boundingClientRect((recs) => {
20937
- let height = recs.height;
20933
+ let height = Array.isArray(recs) ? recs[0].width : recs.width;
20938
20934
  let nodeTop = index2 % rows * (height + top) + 20 + "px";
20939
20935
  styleInfo(index2, nodeTop, width);
20940
20936
  }).exec();
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v1.5.1-beta.0 Fri Apr 14 2023 09:51:56 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:21:35 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -10242,44 +10242,40 @@ var __publicField = (obj, key, value) => {
10242
10242
  uploadTaro(uploadFile, env) {
10243
10243
  var _a;
10244
10244
  const options = this.options;
10245
- if (env === "WEB") {
10246
- this.upload();
10245
+ if (options.beforeXhrUpload) {
10246
+ options.beforeXhrUpload(uploadFile, options);
10247
10247
  } else {
10248
- if (options.beforeXhrUpload) {
10249
- options.beforeXhrUpload(uploadFile, options);
10250
- } else {
10251
- const uploadTask = uploadFile({
10252
- url: options.url,
10253
- filePath: options.taroFilePath,
10254
- fileType: options.fileType,
10255
- header: {
10256
- "Content-Type": "multipart/form-data",
10257
- ...options.headers
10258
- },
10259
- //
10260
- formData: options.formData,
10261
- name: options.name,
10262
- success(response) {
10263
- var _a2, _b;
10264
- if (options.xhrState == response.statusCode) {
10265
- (_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
10266
- } else {
10267
- (_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
10268
- }
10269
- },
10270
- fail(e) {
10271
- var _a2;
10272
- (_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
10273
- }
10274
- });
10275
- (_a = options.onStart) == null ? void 0 : _a.call(options, options);
10276
- uploadTask.progress(
10277
- (res) => {
10278
- var _a2;
10279
- (_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
10248
+ const uploadTask = uploadFile({
10249
+ url: options.url,
10250
+ filePath: options.taroFilePath,
10251
+ fileType: options.fileType,
10252
+ header: {
10253
+ "Content-Type": "multipart/form-data",
10254
+ ...options.headers
10255
+ },
10256
+ //
10257
+ formData: options.formData,
10258
+ name: options.name,
10259
+ success(response) {
10260
+ var _a2, _b;
10261
+ if (options.xhrState == response.statusCode) {
10262
+ (_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
10263
+ } else {
10264
+ (_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
10280
10265
  }
10281
- );
10282
- }
10266
+ },
10267
+ fail(e) {
10268
+ var _a2;
10269
+ (_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e, options);
10270
+ }
10271
+ });
10272
+ (_a = options.onStart) == null ? void 0 : _a.call(options, options);
10273
+ uploadTask.progress(
10274
+ (res) => {
10275
+ var _a2;
10276
+ (_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
10277
+ }
10278
+ );
10283
10279
  }
10284
10280
  }
10285
10281
  }
@@ -11281,7 +11277,7 @@ var __publicField = (obj, key, value) => {
11281
11277
  const getScrollHeight = () => {
11282
11278
  const parentElement = getParentElement("scroller");
11283
11279
  parentElement.boundingClientRect((rect) => {
11284
- scrollHeight.current = rect.height;
11280
+ scrollHeight.current = Array.isArray(rect) ? rect[0].height : rect.height;
11285
11281
  }).exec();
11286
11282
  };
11287
11283
  const getStyle = () => {
@@ -20947,10 +20943,10 @@ This message will only show in development mode. It won't appear in production.
20947
20943
  setTimeout(() => {
20948
20944
  let width = 100;
20949
20945
  query.select(".nut-barrage__body" + timeId.current).boundingClientRect((rec) => {
20950
- width = rec.width || 300;
20946
+ width = (Array.isArray(rec) ? rec[0].width : rec.width) || 300;
20951
20947
  });
20952
20948
  query.select(".nut-barrage__item" + index2).boundingClientRect((recs) => {
20953
- let height = recs.height;
20949
+ let height = Array.isArray(recs) ? recs[0].width : recs.width;
20954
20950
  let nodeTop = index2 % rows * (height + top) + 20 + "px";
20955
20951
  styleInfo(index2, nodeTop, width);
20956
20952
  }).exec();
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.1-beta.0 Fri Apr 14 2023 09:52:19 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v1.5.1 Wed Apr 19 2023 14:22:00 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1352,7 +1352,7 @@ interface BasicDialogProps {
1352
1352
  }
1353
1353
 
1354
1354
  type DialogProps = BasicDialogProps;
1355
- declare const BaseDialog: React__default.ForwardRefExoticComponent<Partial<BasicDialogProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "title"> & React__default.RefAttributes<unknown>>;
1355
+ declare const BaseDialog: React__default.ForwardRefExoticComponent<Partial<BasicDialogProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "title" | "content"> & React__default.RefAttributes<unknown>>;
1356
1356
 
1357
1357
  interface DragProps {
1358
1358
  attract: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "1.5.1-beta.0",
3
+ "version": "1.5.1",
4
4
  "description": "京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序",
5
5
  "title": "NutUI-React",
6
6
  "keywords": [