@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 +10 -0
- package/dist/esm/Barrage.js +1 -1
- package/dist/esm/Infiniteloading.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{barrage.taro-80df08d3.js → barrage.taro-0495a1b2.js} +2 -2
- package/dist/esm/{infiniteloading.taro-e66e3746.js → infiniteloading.taro-183bccbf.js} +3 -1
- package/dist/esm/nutui-react.es.js +3 -3
- package/dist/esm/{uploader.taro-c615fd4c.js → uploader.taro-5a53aa33.js} +28 -33
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +36 -40
- package/dist/nutui.react.umd.js +36 -40
- package/dist/style.mjs +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/esm/Barrage.js
CHANGED
package/dist/esm/Uploader.js
CHANGED
|
@@ -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.
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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 (
|
|
80
|
-
|
|
79
|
+
if (options.beforeXhrUpload) {
|
|
80
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
-
|
|
84
|
-
options.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
}
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.mjs
CHANGED
|
@@ -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
|
|
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 (
|
|
10230
|
-
|
|
10229
|
+
if (options.beforeXhrUpload) {
|
|
10230
|
+
options.beforeXhrUpload(uploadFile2, options);
|
|
10231
10231
|
} else {
|
|
10232
|
-
|
|
10233
|
-
options.
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
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.
|
|
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();
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -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
|
|
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 (
|
|
10246
|
-
|
|
10245
|
+
if (options.beforeXhrUpload) {
|
|
10246
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
10247
10247
|
} else {
|
|
10248
|
-
|
|
10249
|
-
options.
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
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.
|
|
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
package/dist/types/index.d.ts
CHANGED
|
@@ -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;
|