@nutui/nutui-react-taro 1.5.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/InputNumber.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/{inputnumber.taro-7c2d7e85.js → inputnumber.taro-91f65d17.js} +1 -1
- package/dist/esm/nutui-react.es.js +4 -4
- 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 +48 -52
- package/dist/nutui.react.umd.js +48 -52
- package/dist/style.mjs +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/packages/swiper/swiper1.scss +0 -65
package/CHANGELOG.md
CHANGED
package/dist/esm/Barrage.js
CHANGED
package/dist/esm/InputNumber.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
|
};
|
|
@@ -120,7 +120,7 @@ const InputNumber = (props) => {
|
|
|
120
120
|
return (React__default.createElement("div", { className: classes, style: styles, ...restProps },
|
|
121
121
|
React__default.createElement("div", { className: "nut-input-minus" },
|
|
122
122
|
React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: iconMinusClasses, size: buttonSize, name: "minus", onClick: reduceNumber })),
|
|
123
|
-
React__default.createElement("input", { className: "nut-number-input", type: "
|
|
123
|
+
React__default.createElement("input", { className: "nut-number-input", type: "digit", min: min, max: max, style: { width: pxCheck(inputWidth) }, disabled: disabled, readOnly: readonly, value: inputValue, onInput: changeValue, onBlur: burValue, onFocus: focusValue }),
|
|
124
124
|
React__default.createElement("div", { className: "nut-input-add" },
|
|
125
125
|
React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: iconAddClasses, size: buttonSize, name: "plus", onClick: addNumber }))));
|
|
126
126
|
};
|
|
@@ -35,7 +35,7 @@ export { D as DatePicker } from './datepicker.taro-6e9b4b8f.js';
|
|
|
35
35
|
export { F as Form } from './form.taro-0c8e7a39.js';
|
|
36
36
|
export { F as FormItem } from './formitem.taro-190a3326.js';
|
|
37
37
|
export { I as Input } from './input.taro-97af6c96.js';
|
|
38
|
-
export { I as InputNumber } from './inputnumber.taro-
|
|
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-9ad1b7c5.js';
|
|
41
41
|
export { R as Radio, a as RadioGroup } from './radio.taro-a6eff96c.js';
|
|
@@ -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.
|
|
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
|
*/
|
|
@@ -5013,7 +5013,7 @@ const Utils = {
|
|
|
5013
5013
|
* @return {String}
|
|
5014
5014
|
*/
|
|
5015
5015
|
getWhatDay(year, month, day) {
|
|
5016
|
-
const date = new Date(`${year}/${month}/${day}`);
|
|
5016
|
+
const date = /* @__PURE__ */ new Date(`${year}/${month}/${day}`);
|
|
5017
5017
|
const index = date.getDay();
|
|
5018
5018
|
const dayNames = [
|
|
5019
5019
|
"星期日",
|
|
@@ -5031,7 +5031,7 @@ const Utils = {
|
|
|
5031
5031
|
* @return {Number}
|
|
5032
5032
|
*/
|
|
5033
5033
|
getMonthPreDay(year, month) {
|
|
5034
|
-
const date = new Date(`${year}/${month}/01`);
|
|
5034
|
+
const date = /* @__PURE__ */ new Date(`${year}/${month}/01`);
|
|
5035
5035
|
let day = date.getDay();
|
|
5036
5036
|
if (day == 0) {
|
|
5037
5037
|
day = 7;
|
|
@@ -5088,7 +5088,7 @@ const Utils = {
|
|
|
5088
5088
|
*/
|
|
5089
5089
|
getDay(i) {
|
|
5090
5090
|
i = i || 0;
|
|
5091
|
-
let date = new Date();
|
|
5091
|
+
let date = /* @__PURE__ */ new Date();
|
|
5092
5092
|
const diff = i * (1e3 * 60 * 60 * 24);
|
|
5093
5093
|
date = new Date(date.getTime() + diff);
|
|
5094
5094
|
return this.date2Str(date);
|
|
@@ -5280,7 +5280,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
5280
5280
|
};
|
|
5281
5281
|
const isCurrDay = (month, day) => {
|
|
5282
5282
|
const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
|
|
5283
|
-
return Utils.isEqual(date, Utils.date2Str(new Date()));
|
|
5283
|
+
return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date()));
|
|
5284
5284
|
};
|
|
5285
5285
|
const confirm = () => {
|
|
5286
5286
|
const { type: type2 } = props;
|
|
@@ -5616,8 +5616,8 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
5616
5616
|
}
|
|
5617
5617
|
});
|
|
5618
5618
|
} else {
|
|
5619
|
-
const currentYear2 = new Date().getFullYear();
|
|
5620
|
-
const currentMonth = new Date().getMonth() + 1;
|
|
5619
|
+
const currentYear2 = (/* @__PURE__ */ new Date()).getFullYear();
|
|
5620
|
+
const currentMonth = (/* @__PURE__ */ new Date()).getMonth() + 1;
|
|
5621
5621
|
const currentYearMonthIndex = state.monthsData.findIndex((item) => {
|
|
5622
5622
|
return +item.curData[0] === currentYear2 && +item.curData[1] === currentMonth;
|
|
5623
5623
|
});
|
|
@@ -7244,7 +7244,7 @@ const ConfigContext = createContext(null);
|
|
|
7244
7244
|
const useConfig = () => {
|
|
7245
7245
|
return useContext(ConfigContext) ?? getDefaultConfig();
|
|
7246
7246
|
};
|
|
7247
|
-
const currentYear = new Date().getFullYear();
|
|
7247
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
7248
7248
|
const defaultProps$_ = {
|
|
7249
7249
|
modelValue: null,
|
|
7250
7250
|
visible: false,
|
|
@@ -8360,7 +8360,7 @@ const InputNumber = (props) => {
|
|
|
8360
8360
|
"input",
|
|
8361
8361
|
{
|
|
8362
8362
|
className: "nut-number-input",
|
|
8363
|
-
type: "
|
|
8363
|
+
type: "digit",
|
|
8364
8364
|
min,
|
|
8365
8365
|
max,
|
|
8366
8366
|
style: { width: pxCheck$1(inputWidth) },
|
|
@@ -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
|
}
|
|
@@ -10332,7 +10328,7 @@ class FileItem {
|
|
|
10332
10328
|
constructor() {
|
|
10333
10329
|
__publicField(this, "status", "ready");
|
|
10334
10330
|
__publicField(this, "message", "准备中..");
|
|
10335
|
-
__publicField(this, "uid", new Date().getTime().toString());
|
|
10331
|
+
__publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
|
|
10336
10332
|
__publicField(this, "name");
|
|
10337
10333
|
__publicField(this, "url");
|
|
10338
10334
|
__publicField(this, "type");
|
|
@@ -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 = () => {
|
|
@@ -18411,7 +18407,7 @@ const ImagePreview = (props) => {
|
|
|
18411
18407
|
const touches = event.touches;
|
|
18412
18408
|
const events = touches[0];
|
|
18413
18409
|
const events2 = touches[1];
|
|
18414
|
-
const curTouchTime = new Date().getTime();
|
|
18410
|
+
const curTouchTime = (/* @__PURE__ */ new Date()).getTime();
|
|
18415
18411
|
if (curTouchTime - lastTouchEndTime < 300) {
|
|
18416
18412
|
const store12 = store;
|
|
18417
18413
|
if (store12.scale > 1) {
|
|
@@ -18465,7 +18461,7 @@ const ImagePreview = (props) => {
|
|
|
18465
18461
|
}
|
|
18466
18462
|
};
|
|
18467
18463
|
const onTouchEnd = () => {
|
|
18468
|
-
setLastTouchEndTime(new Date().getTime());
|
|
18464
|
+
setLastTouchEndTime((/* @__PURE__ */ new Date()).getTime());
|
|
18469
18465
|
const store1 = store;
|
|
18470
18466
|
store1.moveable = false;
|
|
18471
18467
|
if (store1.scale < 1.1 && store1.scale > 1 || store1.scale < 1) {
|
|
@@ -20900,7 +20896,7 @@ const InternalBarrage = (props, ref) => {
|
|
|
20900
20896
|
const barrageListSet = useRef(barrageList);
|
|
20901
20897
|
const barrageBody = useRef(null);
|
|
20902
20898
|
const barrageContainer = useRef(null);
|
|
20903
|
-
const timeId = useRef(new Date().getTime());
|
|
20899
|
+
const timeId = useRef((/* @__PURE__ */ new Date()).getTime());
|
|
20904
20900
|
const timer = useRef(0);
|
|
20905
20901
|
useRef(0);
|
|
20906
20902
|
const b2 = cn("barrage");
|
|
@@ -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.
|
|
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
|
*/
|
|
@@ -5029,7 +5029,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5029
5029
|
* @return {String}
|
|
5030
5030
|
*/
|
|
5031
5031
|
getWhatDay(year, month, day) {
|
|
5032
|
-
const date = new Date(`${year}/${month}/${day}`);
|
|
5032
|
+
const date = /* @__PURE__ */ new Date(`${year}/${month}/${day}`);
|
|
5033
5033
|
const index = date.getDay();
|
|
5034
5034
|
const dayNames = [
|
|
5035
5035
|
"星期日",
|
|
@@ -5047,7 +5047,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5047
5047
|
* @return {Number}
|
|
5048
5048
|
*/
|
|
5049
5049
|
getMonthPreDay(year, month) {
|
|
5050
|
-
const date = new Date(`${year}/${month}/01`);
|
|
5050
|
+
const date = /* @__PURE__ */ new Date(`${year}/${month}/01`);
|
|
5051
5051
|
let day = date.getDay();
|
|
5052
5052
|
if (day == 0) {
|
|
5053
5053
|
day = 7;
|
|
@@ -5104,7 +5104,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5104
5104
|
*/
|
|
5105
5105
|
getDay(i) {
|
|
5106
5106
|
i = i || 0;
|
|
5107
|
-
let date = new Date();
|
|
5107
|
+
let date = /* @__PURE__ */ new Date();
|
|
5108
5108
|
const diff = i * (1e3 * 60 * 60 * 24);
|
|
5109
5109
|
date = new Date(date.getTime() + diff);
|
|
5110
5110
|
return this.date2Str(date);
|
|
@@ -5296,7 +5296,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5296
5296
|
};
|
|
5297
5297
|
const isCurrDay = (month, day) => {
|
|
5298
5298
|
const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
|
|
5299
|
-
return Utils.isEqual(date, Utils.date2Str(new Date()));
|
|
5299
|
+
return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date()));
|
|
5300
5300
|
};
|
|
5301
5301
|
const confirm = () => {
|
|
5302
5302
|
const { type: type2 } = props;
|
|
@@ -5632,8 +5632,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5632
5632
|
}
|
|
5633
5633
|
});
|
|
5634
5634
|
} else {
|
|
5635
|
-
const currentYear2 = new Date().getFullYear();
|
|
5636
|
-
const currentMonth = new Date().getMonth() + 1;
|
|
5635
|
+
const currentYear2 = (/* @__PURE__ */ new Date()).getFullYear();
|
|
5636
|
+
const currentMonth = (/* @__PURE__ */ new Date()).getMonth() + 1;
|
|
5637
5637
|
const currentYearMonthIndex = state.monthsData.findIndex((item) => {
|
|
5638
5638
|
return +item.curData[0] === currentYear2 && +item.curData[1] === currentMonth;
|
|
5639
5639
|
});
|
|
@@ -7260,7 +7260,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7260
7260
|
const useConfig = () => {
|
|
7261
7261
|
return React.useContext(ConfigContext) ?? getDefaultConfig();
|
|
7262
7262
|
};
|
|
7263
|
-
const currentYear = new Date().getFullYear();
|
|
7263
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
7264
7264
|
const defaultProps$_ = {
|
|
7265
7265
|
modelValue: null,
|
|
7266
7266
|
visible: false,
|
|
@@ -8376,7 +8376,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8376
8376
|
"input",
|
|
8377
8377
|
{
|
|
8378
8378
|
className: "nut-number-input",
|
|
8379
|
-
type: "
|
|
8379
|
+
type: "digit",
|
|
8380
8380
|
min,
|
|
8381
8381
|
max,
|
|
8382
8382
|
style: { width: pxCheck$1(inputWidth) },
|
|
@@ -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
|
}
|
|
@@ -10348,7 +10344,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10348
10344
|
constructor() {
|
|
10349
10345
|
__publicField(this, "status", "ready");
|
|
10350
10346
|
__publicField(this, "message", "准备中..");
|
|
10351
|
-
__publicField(this, "uid", new Date().getTime().toString());
|
|
10347
|
+
__publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
|
|
10352
10348
|
__publicField(this, "name");
|
|
10353
10349
|
__publicField(this, "url");
|
|
10354
10350
|
__publicField(this, "type");
|
|
@@ -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 = () => {
|
|
@@ -18427,7 +18423,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
18427
18423
|
const touches = event.touches;
|
|
18428
18424
|
const events = touches[0];
|
|
18429
18425
|
const events2 = touches[1];
|
|
18430
|
-
const curTouchTime = new Date().getTime();
|
|
18426
|
+
const curTouchTime = (/* @__PURE__ */ new Date()).getTime();
|
|
18431
18427
|
if (curTouchTime - lastTouchEndTime < 300) {
|
|
18432
18428
|
const store12 = store;
|
|
18433
18429
|
if (store12.scale > 1) {
|
|
@@ -18481,7 +18477,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
18481
18477
|
}
|
|
18482
18478
|
};
|
|
18483
18479
|
const onTouchEnd = () => {
|
|
18484
|
-
setLastTouchEndTime(new Date().getTime());
|
|
18480
|
+
setLastTouchEndTime((/* @__PURE__ */ new Date()).getTime());
|
|
18485
18481
|
const store1 = store;
|
|
18486
18482
|
store1.moveable = false;
|
|
18487
18483
|
if (store1.scale < 1.1 && store1.scale > 1 || store1.scale < 1) {
|
|
@@ -20916,7 +20912,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
20916
20912
|
const barrageListSet = React.useRef(barrageList);
|
|
20917
20913
|
const barrageBody = React.useRef(null);
|
|
20918
20914
|
const barrageContainer = React.useRef(null);
|
|
20919
|
-
const timeId = React.useRef(new Date().getTime());
|
|
20915
|
+
const timeId = React.useRef((/* @__PURE__ */ new Date()).getTime());
|
|
20920
20916
|
const timer = React.useRef(0);
|
|
20921
20917
|
React.useRef(0);
|
|
20922
20918
|
const b2 = cn("barrage");
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.nut-swiper {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.nut-swiper__container {
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100%;
|
|
10
|
-
overflow: visible;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.nut-swiper__track {
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
position: relative;
|
|
17
|
-
display: flex;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.nut-swiper__track > div {
|
|
21
|
-
flex-shrink: 0;
|
|
22
|
-
width: 100%;
|
|
23
|
-
height: 100%;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.nut-swiper__track-vertical {
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.nut-swiper__pagination {
|
|
31
|
-
display: flex;
|
|
32
|
-
position: absolute;
|
|
33
|
-
left: 50%;
|
|
34
|
-
bottom: $swiper-pagination-bottom;
|
|
35
|
-
transform: translateX(-50%);
|
|
36
|
-
i {
|
|
37
|
-
width: $swiper-pagination-item-width;
|
|
38
|
-
height: $swiper-pagination-item-height;
|
|
39
|
-
margin-right: $swiper-pagination-item-margin-right;
|
|
40
|
-
border-radius: $swiper-pagination-item-border-radius;
|
|
41
|
-
&:last-child {
|
|
42
|
-
margin-right: 0;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.nut-swiper__pagination-vertical {
|
|
48
|
-
top: 50%;
|
|
49
|
-
left: 12px;
|
|
50
|
-
bottom: auto;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
-webkit-box-orient: vertical;
|
|
53
|
-
-webkit-box-direction: normal;
|
|
54
|
-
transform: translateY(-50%);
|
|
55
|
-
i {
|
|
56
|
-
margin-bottom: 5px;
|
|
57
|
-
width: 6px;
|
|
58
|
-
height: 6px;
|
|
59
|
-
border-radius: 50%;
|
|
60
|
-
&.active {
|
|
61
|
-
height: 18px;
|
|
62
|
-
border-radius: 5px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|