@nutui/nutui-react-taro 2.0.0-alpha.0 → 2.0.0-alpha.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 +24 -630
- package/dist/esm/ActionSheet.js +3 -3
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Calendar.js +5 -5
- package/dist/esm/Cascader.js +4 -4
- package/dist/esm/Col.js +2 -1
- package/dist/esm/DatePicker.js +5 -5
- package/dist/esm/ImagePreview.js +5 -5
- package/dist/esm/NumberKeyboard.js +3 -3
- package/dist/esm/Picker.js +4 -4
- package/dist/esm/Popup.js +2 -4
- package/dist/esm/Row.js +2 -1
- package/dist/esm/ShortPassword.js +3 -3
- package/dist/esm/SideNavBar.js +3 -8
- package/dist/esm/TimeSelect.js +4 -4
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{actionsheet.taro-b76a342e.js → actionsheet.taro-10cc53ee.js} +1 -1
- package/dist/esm/{address.taro-1812caeb.js → address.taro-632ca799.js} +1 -1
- package/dist/esm/{calendar.taro-b6b147ca.js → calendar.taro-099cb4a2.js} +1 -1
- package/dist/esm/{cascader.taro-9c0a1a38.js → cascader.taro-62e764a7.js} +2 -2
- package/dist/esm/{col.taro-53eed3cc.js → col.taro-a99a9171.js} +3 -1
- package/dist/esm/{datepicker.taro-439e2080.js → datepicker.taro-0f2bcf42.js} +1 -1
- package/dist/esm/{imagepreview.taro-867ee24a.js → imagepreview.taro-b88fcf41.js} +2 -2
- package/dist/esm/{numberkeyboard.taro-81b36e5e.js → numberkeyboard.taro-ed9b2149.js} +2 -2
- package/dist/esm/nutui-react.es.js +17 -17
- package/dist/esm/{picker.taro-5c9030a7.js → picker.taro-5028afcb.js} +1 -1
- package/dist/esm/{popup.taro-124b9bab.js → popup.taro-020bf791.js} +27 -30
- package/dist/esm/{row.taro-f64d4a13.js → row.taro-75039d53.js} +5 -3
- package/dist/esm/{shortpassword.taro-9a2c98ad.js → shortpassword.taro-681a33a1.js} +1 -1
- package/dist/esm/{sidenavbar.taro-0265812f.js → sidenavbar.taro-d5c5b331.js} +1 -3
- package/dist/esm/{timeselect.taro-5b047850.js → timeselect.taro-a4b86771.js} +1 -1
- package/dist/esm/{uploader.taro-0cca7e97.js → uploader.taro-2151eec6.js} +34 -36
- 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 +240 -244
- package/dist/nutui.react.umd.js +240 -244
- package/dist/packages/audio/audio.scss +2 -15
- package/dist/packages/calendar/calendar.scss +0 -30
- package/dist/packages/popup/popup.scss +0 -16
- package/dist/packages/row/row.scss +13 -31
- package/dist/packages/sidenavbar/sidenavbar.scss +0 -19
- package/dist/packages/uploader/uploader.scss +2 -28
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/index.d.ts +25 -27
- package/package.json +1 -1
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 v2.0.0-alpha.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.0-alpha.1 Fri Apr 21 2023 18:02:35 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -2796,7 +2796,7 @@ const defaultProps$1s = {
|
|
|
2796
2796
|
onClick: (event) => {
|
|
2797
2797
|
}
|
|
2798
2798
|
};
|
|
2799
|
-
const classPrefix$
|
|
2799
|
+
const classPrefix$7 = "nut-cell";
|
|
2800
2800
|
const Cell = (props) => {
|
|
2801
2801
|
const {
|
|
2802
2802
|
children,
|
|
@@ -2825,26 +2825,26 @@ const Cell = (props) => {
|
|
|
2825
2825
|
flex: 1
|
|
2826
2826
|
};
|
|
2827
2827
|
return /* @__PURE__ */ jsx("div", {
|
|
2828
|
-
className: classNames(classPrefix$
|
|
2828
|
+
className: classNames(classPrefix$7, className),
|
|
2829
2829
|
onClick: (event) => handleClick(event),
|
|
2830
2830
|
style: baseStyle,
|
|
2831
2831
|
...rest,
|
|
2832
2832
|
children: children || /* @__PURE__ */ jsxs(Fragment, {
|
|
2833
2833
|
children: [title || description ? /* @__PURE__ */ jsxs("div", {
|
|
2834
|
-
className: `${classPrefix$
|
|
2834
|
+
className: `${classPrefix$7}__left`,
|
|
2835
2835
|
children: [title ? /* @__PURE__ */ jsx("div", {
|
|
2836
|
-
className: `${classPrefix$
|
|
2836
|
+
className: `${classPrefix$7}__title`,
|
|
2837
2837
|
children: title
|
|
2838
2838
|
}) : null, description ? /* @__PURE__ */ jsx("div", {
|
|
2839
|
-
className: `${classPrefix$
|
|
2839
|
+
className: `${classPrefix$7}__description`,
|
|
2840
2840
|
children: description
|
|
2841
2841
|
}) : null]
|
|
2842
2842
|
}) : null, extra ? /* @__PURE__ */ jsx("div", {
|
|
2843
|
-
className: `${classPrefix$
|
|
2843
|
+
className: `${classPrefix$7}__extra`,
|
|
2844
2844
|
style: styles,
|
|
2845
2845
|
children: extra
|
|
2846
2846
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
2847
|
-
className: `${classPrefix$
|
|
2847
|
+
className: `${classPrefix$7}__divider`
|
|
2848
2848
|
})]
|
|
2849
2849
|
})
|
|
2850
2850
|
});
|
|
@@ -2856,7 +2856,7 @@ const defaultProps$1r = {
|
|
|
2856
2856
|
title: "",
|
|
2857
2857
|
description: ""
|
|
2858
2858
|
};
|
|
2859
|
-
const classPrefix$
|
|
2859
|
+
const classPrefix$6 = "nut-cell-group";
|
|
2860
2860
|
const CellGroup = (props) => {
|
|
2861
2861
|
const {
|
|
2862
2862
|
children,
|
|
@@ -2870,16 +2870,16 @@ const CellGroup = (props) => {
|
|
|
2870
2870
|
...props
|
|
2871
2871
|
};
|
|
2872
2872
|
return /* @__PURE__ */ jsxs("div", {
|
|
2873
|
-
className: classNames(classPrefix$
|
|
2873
|
+
className: classNames(classPrefix$6, className),
|
|
2874
2874
|
...rest,
|
|
2875
2875
|
children: [title ? /* @__PURE__ */ jsx("div", {
|
|
2876
|
-
className: `${classPrefix$
|
|
2876
|
+
className: `${classPrefix$6}__title`,
|
|
2877
2877
|
children: title
|
|
2878
2878
|
}) : null, description ? /* @__PURE__ */ jsx("div", {
|
|
2879
|
-
className: `${classPrefix$
|
|
2879
|
+
className: `${classPrefix$6}__description`,
|
|
2880
2880
|
children: description
|
|
2881
2881
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
2882
|
-
className: `${classPrefix$
|
|
2882
|
+
className: `${classPrefix$6}__wrap`,
|
|
2883
2883
|
children
|
|
2884
2884
|
})]
|
|
2885
2885
|
});
|
|
@@ -3446,7 +3446,7 @@ const defaultOverlayProps = {
|
|
|
3446
3446
|
visible: false,
|
|
3447
3447
|
lockScroll: true
|
|
3448
3448
|
};
|
|
3449
|
-
const classPrefix$
|
|
3449
|
+
const classPrefix$5 = `nut-overlay`;
|
|
3450
3450
|
const Overlay = (props) => {
|
|
3451
3451
|
const {
|
|
3452
3452
|
children,
|
|
@@ -3490,7 +3490,7 @@ const Overlay = (props) => {
|
|
|
3490
3490
|
"overlay-fade-enter-active": visible,
|
|
3491
3491
|
"first-render": renderRef.current && !visible,
|
|
3492
3492
|
"hidden-render": !visible
|
|
3493
|
-
}, className, classPrefix$
|
|
3493
|
+
}, className, classPrefix$5);
|
|
3494
3494
|
const styles = {
|
|
3495
3495
|
zIndex,
|
|
3496
3496
|
animationDuration: `${props.duration}s`,
|
|
@@ -5267,152 +5267,25 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
5267
5267
|
onExited: propTypesExports.func
|
|
5268
5268
|
}) : {};
|
|
5269
5269
|
const CSSTransition$1 = CSSTransition;
|
|
5270
|
-
var classnameExports = {};
|
|
5271
|
-
var classname = {
|
|
5272
|
-
get exports() {
|
|
5273
|
-
return classnameExports;
|
|
5274
|
-
},
|
|
5275
|
-
set exports(v) {
|
|
5276
|
-
classnameExports = v;
|
|
5277
|
-
}
|
|
5278
|
-
};
|
|
5279
|
-
var classname_production_min = {};
|
|
5280
|
-
var hasRequiredClassname_production_min;
|
|
5281
|
-
function requireClassname_production_min() {
|
|
5282
|
-
if (hasRequiredClassname_production_min)
|
|
5283
|
-
return classname_production_min;
|
|
5284
|
-
hasRequiredClassname_production_min = 1;
|
|
5285
|
-
function r2(r3) {
|
|
5286
|
-
function t2(t3, i, a2, o) {
|
|
5287
|
-
var f = i ? e + t3 + r3.e + i : e + t3, v = f;
|
|
5288
|
-
if (a2) {
|
|
5289
|
-
var s = " " + v + r3.m;
|
|
5290
|
-
for (var u in a2)
|
|
5291
|
-
if (a2.hasOwnProperty(u)) {
|
|
5292
|
-
var p = a2[u];
|
|
5293
|
-
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
5294
|
-
}
|
|
5295
|
-
}
|
|
5296
|
-
if (void 0 !== o)
|
|
5297
|
-
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
5298
|
-
var l = o[y2];
|
|
5299
|
-
if (l && "string" == typeof l.valueOf())
|
|
5300
|
-
for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
5301
|
-
var h = g[d];
|
|
5302
|
-
h !== f && (v += " " + h);
|
|
5303
|
-
}
|
|
5304
|
-
}
|
|
5305
|
-
return v;
|
|
5306
|
-
}
|
|
5307
|
-
var e = r3.n || "", n = r3.v || r3.m;
|
|
5308
|
-
return function(r4, e2) {
|
|
5309
|
-
return function(n2, i, a2) {
|
|
5310
|
-
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r4, n2, void 0, i) : t2(r4, n2, i, a2) : t2(r4, e2, n2, i);
|
|
5311
|
-
};
|
|
5312
|
-
};
|
|
5313
|
-
}
|
|
5314
|
-
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
5315
|
-
var t = r2({ e: "-", m: "_" });
|
|
5316
|
-
classname_production_min.cn = t, classname_production_min.withNaming = r2;
|
|
5317
|
-
return classname_production_min;
|
|
5318
|
-
}
|
|
5319
|
-
var classname_development = {};
|
|
5320
|
-
var hasRequiredClassname_development;
|
|
5321
|
-
function requireClassname_development() {
|
|
5322
|
-
if (hasRequiredClassname_development)
|
|
5323
|
-
return classname_development;
|
|
5324
|
-
hasRequiredClassname_development = 1;
|
|
5325
|
-
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
5326
|
-
function withNaming(preset) {
|
|
5327
|
-
var nameSpace = preset.n || "";
|
|
5328
|
-
var modValueDelimiter = preset.v || preset.m;
|
|
5329
|
-
function stringify(b2, e, m, mix) {
|
|
5330
|
-
var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
|
|
5331
|
-
var className = entityName;
|
|
5332
|
-
if (m) {
|
|
5333
|
-
var modPrefix = " " + className + preset.m;
|
|
5334
|
-
for (var k in m) {
|
|
5335
|
-
if (m.hasOwnProperty(k)) {
|
|
5336
|
-
var modVal = m[k];
|
|
5337
|
-
if (modVal === true) {
|
|
5338
|
-
className += modPrefix + k;
|
|
5339
|
-
} else if (modVal) {
|
|
5340
|
-
className += modPrefix + k + modValueDelimiter + modVal;
|
|
5341
|
-
}
|
|
5342
|
-
}
|
|
5343
|
-
}
|
|
5344
|
-
}
|
|
5345
|
-
if (mix !== void 0) {
|
|
5346
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
5347
|
-
for (var i = 0, len = mix.length; i < len; i++) {
|
|
5348
|
-
var value = mix[i];
|
|
5349
|
-
if (!value || typeof value.valueOf() !== "string")
|
|
5350
|
-
continue;
|
|
5351
|
-
var mixes = value.valueOf().split(" ");
|
|
5352
|
-
for (var j = 0; j < mixes.length; j++) {
|
|
5353
|
-
var val = mixes[j];
|
|
5354
|
-
if (val !== entityName) {
|
|
5355
|
-
className += " " + val;
|
|
5356
|
-
}
|
|
5357
|
-
}
|
|
5358
|
-
}
|
|
5359
|
-
}
|
|
5360
|
-
return className;
|
|
5361
|
-
}
|
|
5362
|
-
return function cnGenerator(b2, e) {
|
|
5363
|
-
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
5364
|
-
if (typeof elemOrMods === "string") {
|
|
5365
|
-
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
5366
|
-
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
5367
|
-
}
|
|
5368
|
-
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
5369
|
-
}
|
|
5370
|
-
return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
|
|
5371
|
-
};
|
|
5372
|
-
};
|
|
5373
|
-
}
|
|
5374
|
-
var cn2 = withNaming({
|
|
5375
|
-
e: "-",
|
|
5376
|
-
m: "_"
|
|
5377
|
-
});
|
|
5378
|
-
classname_development.cn = cn2;
|
|
5379
|
-
classname_development.withNaming = withNaming;
|
|
5380
|
-
return classname_development;
|
|
5381
|
-
}
|
|
5382
|
-
(function(module) {
|
|
5383
|
-
if (process.env.NODE_ENV === "production") {
|
|
5384
|
-
module.exports = requireClassname_production_min();
|
|
5385
|
-
} else {
|
|
5386
|
-
module.exports = requireClassname_development();
|
|
5387
|
-
}
|
|
5388
|
-
})(classname);
|
|
5389
|
-
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
5390
5270
|
const defaultProps$1o = {
|
|
5391
5271
|
...ComponentDefaults,
|
|
5392
5272
|
position: "center",
|
|
5393
5273
|
transition: "",
|
|
5394
5274
|
overlayStyle: {},
|
|
5395
|
-
|
|
5396
|
-
popClass: "",
|
|
5275
|
+
overlayClassName: "",
|
|
5397
5276
|
closeable: false,
|
|
5398
5277
|
closeIconPosition: "top-right",
|
|
5399
5278
|
closeIcon: "close",
|
|
5400
|
-
destroyOnClose:
|
|
5401
|
-
|
|
5279
|
+
destroyOnClose: false,
|
|
5280
|
+
portal: null,
|
|
5402
5281
|
overlay: true,
|
|
5403
5282
|
round: false,
|
|
5404
5283
|
onOpen: () => {
|
|
5405
5284
|
},
|
|
5406
5285
|
onClose: () => {
|
|
5407
5286
|
},
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
onClosed: (e) => {
|
|
5411
|
-
},
|
|
5412
|
-
onClickOverlay: (e) => {
|
|
5413
|
-
},
|
|
5414
|
-
onClickCloseIcon: (e) => {
|
|
5415
|
-
},
|
|
5287
|
+
onClickOverlay: (e) => true,
|
|
5288
|
+
onClickCloseIcon: (e) => true,
|
|
5416
5289
|
...defaultOverlayProps
|
|
5417
5290
|
};
|
|
5418
5291
|
let _zIndex = 2e3;
|
|
@@ -5423,7 +5296,7 @@ const Popup = (props) => {
|
|
|
5423
5296
|
overlay,
|
|
5424
5297
|
closeOnOverlayClick,
|
|
5425
5298
|
overlayStyle,
|
|
5426
|
-
|
|
5299
|
+
overlayClassName,
|
|
5427
5300
|
zIndex,
|
|
5428
5301
|
lockScroll,
|
|
5429
5302
|
duration,
|
|
@@ -5434,23 +5307,22 @@ const Popup = (props) => {
|
|
|
5434
5307
|
transition,
|
|
5435
5308
|
round,
|
|
5436
5309
|
position,
|
|
5437
|
-
popClass,
|
|
5438
5310
|
className,
|
|
5439
5311
|
destroyOnClose,
|
|
5440
|
-
|
|
5312
|
+
portal,
|
|
5441
5313
|
onOpen,
|
|
5442
5314
|
onClose,
|
|
5443
5315
|
onClickOverlay,
|
|
5444
5316
|
onClickCloseIcon,
|
|
5445
|
-
|
|
5446
|
-
|
|
5317
|
+
afterShow,
|
|
5318
|
+
afterClose,
|
|
5447
5319
|
onClick
|
|
5448
5320
|
} = props;
|
|
5449
5321
|
const [index, setIndex] = useState(zIndex || _zIndex);
|
|
5450
5322
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
5451
5323
|
const [showChildren, setShowChildren] = useState(true);
|
|
5452
5324
|
const [transitionName, setTransitionName] = useState("");
|
|
5453
|
-
const
|
|
5325
|
+
const classPrefix2 = "nut-popup";
|
|
5454
5326
|
const baseStyle = {
|
|
5455
5327
|
zIndex: index,
|
|
5456
5328
|
animationDuration: `${duration}s`
|
|
@@ -5463,15 +5335,15 @@ const Popup = (props) => {
|
|
|
5463
5335
|
...style,
|
|
5464
5336
|
...baseStyle
|
|
5465
5337
|
};
|
|
5466
|
-
const
|
|
5338
|
+
const popClassName = classNames({
|
|
5467
5339
|
round,
|
|
5468
|
-
[
|
|
5469
|
-
[`${
|
|
5340
|
+
[`${classPrefix2}`]: true,
|
|
5341
|
+
[`${classPrefix2}-${position}`]: true,
|
|
5470
5342
|
[`${className || ""}`]: true
|
|
5471
|
-
}
|
|
5343
|
+
});
|
|
5472
5344
|
const closeClasses = classNames({
|
|
5473
|
-
|
|
5474
|
-
[
|
|
5345
|
+
[`${classPrefix2}__close-icon`]: true,
|
|
5346
|
+
[`${classPrefix2}__close-icon--${closeIconPosition}`]: true
|
|
5475
5347
|
});
|
|
5476
5348
|
const open = () => {
|
|
5477
5349
|
if (!innerVisible) {
|
|
@@ -5489,29 +5361,29 @@ const Popup = (props) => {
|
|
|
5489
5361
|
if (destroyOnClose) {
|
|
5490
5362
|
setTimeout(() => {
|
|
5491
5363
|
setShowChildren(false);
|
|
5492
|
-
onClose && onClose();
|
|
5493
5364
|
}, Number(duration) * 1e3);
|
|
5494
5365
|
}
|
|
5366
|
+
onClose && onClose();
|
|
5495
5367
|
}
|
|
5496
5368
|
};
|
|
5497
5369
|
const onHandleClickOverlay = (e) => {
|
|
5498
5370
|
if (closeOnOverlayClick) {
|
|
5499
|
-
onClickOverlay && onClickOverlay(e);
|
|
5500
|
-
close();
|
|
5371
|
+
const closed = onClickOverlay && onClickOverlay(e);
|
|
5372
|
+
closed && close();
|
|
5501
5373
|
}
|
|
5502
5374
|
};
|
|
5503
5375
|
const onHandleClick = (e) => {
|
|
5504
5376
|
onClick && onClick(e);
|
|
5505
5377
|
};
|
|
5506
5378
|
const onHandleClickCloseIcon = (e) => {
|
|
5507
|
-
onClickCloseIcon && onClickCloseIcon(e);
|
|
5508
|
-
close();
|
|
5379
|
+
const closed = onClickCloseIcon && onClickCloseIcon(e);
|
|
5380
|
+
closed && close();
|
|
5509
5381
|
};
|
|
5510
5382
|
const onHandleOpened = (e) => {
|
|
5511
|
-
|
|
5383
|
+
afterShow && afterShow();
|
|
5512
5384
|
};
|
|
5513
5385
|
const onHandleClosed = (e) => {
|
|
5514
|
-
|
|
5386
|
+
afterClose && afterClose();
|
|
5515
5387
|
};
|
|
5516
5388
|
const resolveContainer = (getContainer) => {
|
|
5517
5389
|
const container = typeof getContainer === "function" ? getContainer() : getContainer;
|
|
@@ -5526,7 +5398,7 @@ const Popup = (props) => {
|
|
|
5526
5398
|
};
|
|
5527
5399
|
const renderIcon = () => {
|
|
5528
5400
|
if (closeable) {
|
|
5529
|
-
return /* @__PURE__ */ jsx(
|
|
5401
|
+
return /* @__PURE__ */ jsx(View, {
|
|
5530
5402
|
className: closeClasses,
|
|
5531
5403
|
onClick: onHandleClickCloseIcon,
|
|
5532
5404
|
children: React__default.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ jsx(a$p, {
|
|
@@ -5545,9 +5417,9 @@ const Popup = (props) => {
|
|
|
5545
5417
|
in: innerVisible,
|
|
5546
5418
|
onEntered: onHandleOpened,
|
|
5547
5419
|
onExited: onHandleClosed,
|
|
5548
|
-
children: /* @__PURE__ */ jsxs(
|
|
5420
|
+
children: /* @__PURE__ */ jsxs(View, {
|
|
5549
5421
|
style: popStyles,
|
|
5550
|
-
className:
|
|
5422
|
+
className: popClassName,
|
|
5551
5423
|
onClick: onHandleClick,
|
|
5552
5424
|
children: [showChildren ? children : "", renderIcon()]
|
|
5553
5425
|
})
|
|
@@ -5558,7 +5430,7 @@ const Popup = (props) => {
|
|
|
5558
5430
|
children: overlay ? /* @__PURE__ */ jsxs(Fragment, {
|
|
5559
5431
|
children: [/* @__PURE__ */ jsx(Overlay, {
|
|
5560
5432
|
style: overlayStyles,
|
|
5561
|
-
className:
|
|
5433
|
+
className: overlayClassName,
|
|
5562
5434
|
visible: innerVisible,
|
|
5563
5435
|
closeOnOverlayClick,
|
|
5564
5436
|
zIndex,
|
|
@@ -5576,16 +5448,17 @@ const Popup = (props) => {
|
|
|
5576
5448
|
!visible && close();
|
|
5577
5449
|
}, [visible]);
|
|
5578
5450
|
useEffect(() => {
|
|
5579
|
-
setTransitionName(transition ||
|
|
5580
|
-
}, [position]);
|
|
5451
|
+
setTransitionName(transition || `${classPrefix2}-slide-${position}`);
|
|
5452
|
+
}, [position, transition]);
|
|
5581
5453
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
5582
|
-
children: renderToContainer(
|
|
5454
|
+
children: renderToContainer(portal, renderNode())
|
|
5583
5455
|
});
|
|
5584
5456
|
};
|
|
5585
5457
|
Popup.defaultProps = defaultProps$1o;
|
|
5586
5458
|
Popup.displayName = "NutPopup";
|
|
5587
5459
|
const DataContext$2 = createContext({});
|
|
5588
5460
|
const defaultProps$1n = {
|
|
5461
|
+
...ComponentDefaults,
|
|
5589
5462
|
span: "24",
|
|
5590
5463
|
offset: "0",
|
|
5591
5464
|
gutter: "0"
|
|
@@ -5593,7 +5466,7 @@ const defaultProps$1n = {
|
|
|
5593
5466
|
const Col = (props) => {
|
|
5594
5467
|
const {
|
|
5595
5468
|
className,
|
|
5596
|
-
style
|
|
5469
|
+
style,
|
|
5597
5470
|
span,
|
|
5598
5471
|
offset,
|
|
5599
5472
|
children,
|
|
@@ -5639,7 +5512,7 @@ const defaultProps$1m = {
|
|
|
5639
5512
|
contentPosition: "center",
|
|
5640
5513
|
direction: "horizontal"
|
|
5641
5514
|
};
|
|
5642
|
-
const classPrefix$
|
|
5515
|
+
const classPrefix$4 = `nut-divider`;
|
|
5643
5516
|
const Divider = (props) => {
|
|
5644
5517
|
const {
|
|
5645
5518
|
children,
|
|
@@ -5653,14 +5526,14 @@ const Divider = (props) => {
|
|
|
5653
5526
|
...props
|
|
5654
5527
|
};
|
|
5655
5528
|
const classes = direction === "horizontal" ? classNames({
|
|
5656
|
-
[`${classPrefix$
|
|
5657
|
-
[`${classPrefix$
|
|
5658
|
-
[`${classPrefix$
|
|
5659
|
-
[`${classPrefix$
|
|
5660
|
-
[`${classPrefix$
|
|
5529
|
+
[`${classPrefix$4}`]: true,
|
|
5530
|
+
[`${classPrefix$4}__center`]: children,
|
|
5531
|
+
[`${classPrefix$4}__left`]: contentPosition === "left",
|
|
5532
|
+
[`${classPrefix$4}__right`]: contentPosition === "right",
|
|
5533
|
+
[`${classPrefix$4}__hairline`]: true
|
|
5661
5534
|
}) : classNames({
|
|
5662
|
-
[`${classPrefix$
|
|
5663
|
-
[`${classPrefix$
|
|
5535
|
+
[`${classPrefix$4}`]: true,
|
|
5536
|
+
[`${classPrefix$4}__vertical`]: direction === "vertical"
|
|
5664
5537
|
});
|
|
5665
5538
|
return /* @__PURE__ */ jsx("div", {
|
|
5666
5539
|
className: `${classes} ${className || ""}`,
|
|
@@ -5847,7 +5720,9 @@ const Layout = (props) => {
|
|
|
5847
5720
|
};
|
|
5848
5721
|
Layout.defaultProps = defaultProps$1j;
|
|
5849
5722
|
Layout.displayName = "NutLayout";
|
|
5723
|
+
const classPrefix$3 = "nut-row";
|
|
5850
5724
|
const defaultProps$1i = {
|
|
5725
|
+
...ComponentDefaults,
|
|
5851
5726
|
type: "",
|
|
5852
5727
|
justify: "start",
|
|
5853
5728
|
align: "flex-start",
|
|
@@ -5857,7 +5732,7 @@ const defaultProps$1i = {
|
|
|
5857
5732
|
const Row = (props) => {
|
|
5858
5733
|
const {
|
|
5859
5734
|
className,
|
|
5860
|
-
style
|
|
5735
|
+
style,
|
|
5861
5736
|
children,
|
|
5862
5737
|
type,
|
|
5863
5738
|
justify,
|
|
@@ -5869,7 +5744,6 @@ const Row = (props) => {
|
|
|
5869
5744
|
...defaultProps$1i,
|
|
5870
5745
|
...props
|
|
5871
5746
|
};
|
|
5872
|
-
const prefixCls2 = "nut-row";
|
|
5873
5747
|
const getClass = (prefix2, type2) => {
|
|
5874
5748
|
const classType = type2 ? `nut-row-${prefix2}-${type2}` : "";
|
|
5875
5749
|
const className2 = prefix2 ? classType : `nut-row-${type2}`;
|
|
@@ -5881,7 +5755,7 @@ const Row = (props) => {
|
|
|
5881
5755
|
${getClass("justify", justify)}
|
|
5882
5756
|
${getClass("align", align)}
|
|
5883
5757
|
${getClass("flex", wrap)}
|
|
5884
|
-
${
|
|
5758
|
+
${classPrefix$3}
|
|
5885
5759
|
`;
|
|
5886
5760
|
};
|
|
5887
5761
|
const parentRow = {
|
|
@@ -6080,6 +5954,126 @@ const Sticky = (props) => {
|
|
|
6080
5954
|
};
|
|
6081
5955
|
Sticky.defaultProps = defaultProps$1h;
|
|
6082
5956
|
Sticky.displayName = "NutSticky";
|
|
5957
|
+
var classnameExports = {};
|
|
5958
|
+
var classname = {
|
|
5959
|
+
get exports() {
|
|
5960
|
+
return classnameExports;
|
|
5961
|
+
},
|
|
5962
|
+
set exports(v) {
|
|
5963
|
+
classnameExports = v;
|
|
5964
|
+
}
|
|
5965
|
+
};
|
|
5966
|
+
var classname_production_min = {};
|
|
5967
|
+
var hasRequiredClassname_production_min;
|
|
5968
|
+
function requireClassname_production_min() {
|
|
5969
|
+
if (hasRequiredClassname_production_min)
|
|
5970
|
+
return classname_production_min;
|
|
5971
|
+
hasRequiredClassname_production_min = 1;
|
|
5972
|
+
function r2(r3) {
|
|
5973
|
+
function t2(t3, i, a2, o) {
|
|
5974
|
+
var f = i ? e + t3 + r3.e + i : e + t3, v = f;
|
|
5975
|
+
if (a2) {
|
|
5976
|
+
var s = " " + v + r3.m;
|
|
5977
|
+
for (var u in a2)
|
|
5978
|
+
if (a2.hasOwnProperty(u)) {
|
|
5979
|
+
var p = a2[u];
|
|
5980
|
+
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
if (void 0 !== o)
|
|
5984
|
+
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
5985
|
+
var l = o[y2];
|
|
5986
|
+
if (l && "string" == typeof l.valueOf())
|
|
5987
|
+
for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
5988
|
+
var h = g[d];
|
|
5989
|
+
h !== f && (v += " " + h);
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
return v;
|
|
5993
|
+
}
|
|
5994
|
+
var e = r3.n || "", n = r3.v || r3.m;
|
|
5995
|
+
return function(r4, e2) {
|
|
5996
|
+
return function(n2, i, a2) {
|
|
5997
|
+
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r4, n2, void 0, i) : t2(r4, n2, i, a2) : t2(r4, e2, n2, i);
|
|
5998
|
+
};
|
|
5999
|
+
};
|
|
6000
|
+
}
|
|
6001
|
+
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
6002
|
+
var t = r2({ e: "-", m: "_" });
|
|
6003
|
+
classname_production_min.cn = t, classname_production_min.withNaming = r2;
|
|
6004
|
+
return classname_production_min;
|
|
6005
|
+
}
|
|
6006
|
+
var classname_development = {};
|
|
6007
|
+
var hasRequiredClassname_development;
|
|
6008
|
+
function requireClassname_development() {
|
|
6009
|
+
if (hasRequiredClassname_development)
|
|
6010
|
+
return classname_development;
|
|
6011
|
+
hasRequiredClassname_development = 1;
|
|
6012
|
+
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
6013
|
+
function withNaming(preset) {
|
|
6014
|
+
var nameSpace = preset.n || "";
|
|
6015
|
+
var modValueDelimiter = preset.v || preset.m;
|
|
6016
|
+
function stringify(b2, e, m, mix) {
|
|
6017
|
+
var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
|
|
6018
|
+
var className = entityName;
|
|
6019
|
+
if (m) {
|
|
6020
|
+
var modPrefix = " " + className + preset.m;
|
|
6021
|
+
for (var k in m) {
|
|
6022
|
+
if (m.hasOwnProperty(k)) {
|
|
6023
|
+
var modVal = m[k];
|
|
6024
|
+
if (modVal === true) {
|
|
6025
|
+
className += modPrefix + k;
|
|
6026
|
+
} else if (modVal) {
|
|
6027
|
+
className += modPrefix + k + modValueDelimiter + modVal;
|
|
6028
|
+
}
|
|
6029
|
+
}
|
|
6030
|
+
}
|
|
6031
|
+
}
|
|
6032
|
+
if (mix !== void 0) {
|
|
6033
|
+
mix = Array.isArray(mix) ? mix : [mix];
|
|
6034
|
+
for (var i = 0, len = mix.length; i < len; i++) {
|
|
6035
|
+
var value = mix[i];
|
|
6036
|
+
if (!value || typeof value.valueOf() !== "string")
|
|
6037
|
+
continue;
|
|
6038
|
+
var mixes = value.valueOf().split(" ");
|
|
6039
|
+
for (var j = 0; j < mixes.length; j++) {
|
|
6040
|
+
var val = mixes[j];
|
|
6041
|
+
if (val !== entityName) {
|
|
6042
|
+
className += " " + val;
|
|
6043
|
+
}
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
}
|
|
6047
|
+
return className;
|
|
6048
|
+
}
|
|
6049
|
+
return function cnGenerator(b2, e) {
|
|
6050
|
+
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
6051
|
+
if (typeof elemOrMods === "string") {
|
|
6052
|
+
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
6053
|
+
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
6054
|
+
}
|
|
6055
|
+
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
6056
|
+
}
|
|
6057
|
+
return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
|
|
6058
|
+
};
|
|
6059
|
+
};
|
|
6060
|
+
}
|
|
6061
|
+
var cn2 = withNaming({
|
|
6062
|
+
e: "-",
|
|
6063
|
+
m: "_"
|
|
6064
|
+
});
|
|
6065
|
+
classname_development.cn = cn2;
|
|
6066
|
+
classname_development.withNaming = withNaming;
|
|
6067
|
+
return classname_development;
|
|
6068
|
+
}
|
|
6069
|
+
(function(module) {
|
|
6070
|
+
if (process.env.NODE_ENV === "production") {
|
|
6071
|
+
module.exports = requireClassname_production_min();
|
|
6072
|
+
} else {
|
|
6073
|
+
module.exports = requireClassname_development();
|
|
6074
|
+
}
|
|
6075
|
+
})(classname);
|
|
6076
|
+
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
6083
6077
|
const elevatorContext = createContext({});
|
|
6084
6078
|
const defaultProps$1g = {
|
|
6085
6079
|
height: "200px",
|
|
@@ -7002,7 +6996,6 @@ const defaultProps$19 = {
|
|
|
7002
6996
|
width: "80%"
|
|
7003
6997
|
};
|
|
7004
6998
|
const SideNavBar = (props) => {
|
|
7005
|
-
useConfig$1();
|
|
7006
6999
|
const {
|
|
7007
7000
|
title,
|
|
7008
7001
|
visible,
|
|
@@ -8933,7 +8926,7 @@ const InternalCascader = (props, ref) => {
|
|
|
8933
8926
|
};
|
|
8934
8927
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
8935
8928
|
children: poppable ? /* @__PURE__ */ jsx(Popup, {
|
|
8936
|
-
|
|
8929
|
+
className: "cascadar-popup",
|
|
8937
8930
|
visible,
|
|
8938
8931
|
position: "bottom",
|
|
8939
8932
|
round: true,
|
|
@@ -11041,7 +11034,7 @@ const NumberKeyboard = (props) => {
|
|
|
11041
11034
|
visible: show,
|
|
11042
11035
|
overlay,
|
|
11043
11036
|
position: "bottom",
|
|
11044
|
-
popClass,
|
|
11037
|
+
className: popClass,
|
|
11045
11038
|
onClickOverlay: onClose,
|
|
11046
11039
|
onClickCloseIcon: onClose,
|
|
11047
11040
|
overlayStyle: {
|
|
@@ -12832,31 +12825,31 @@ const funcInterceptor = (interceptor, {
|
|
|
12832
12825
|
const defaultProps$K = {
|
|
12833
12826
|
...ComponentDefaults,
|
|
12834
12827
|
url: "",
|
|
12835
|
-
|
|
12828
|
+
maxCount: 1,
|
|
12836
12829
|
sizeType: ["original", "compressed"],
|
|
12837
12830
|
sourceType: ["album", "camera"],
|
|
12838
12831
|
mediaType: ["image", "video"],
|
|
12839
12832
|
camera: "back",
|
|
12840
12833
|
uploadIcon: null,
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12834
|
+
uploadLabel: "",
|
|
12835
|
+
previewType: "picture",
|
|
12836
|
+
imageFit: "cover",
|
|
12844
12837
|
name: "file",
|
|
12845
12838
|
accept: "*",
|
|
12846
12839
|
disabled: false,
|
|
12847
12840
|
autoUpload: true,
|
|
12848
12841
|
multiple: false,
|
|
12849
|
-
|
|
12842
|
+
maxFileSize: Number.MAX_VALUE,
|
|
12850
12843
|
data: {},
|
|
12851
12844
|
headers: {},
|
|
12852
12845
|
method: "post",
|
|
12853
|
-
|
|
12846
|
+
previewUrl: "",
|
|
12854
12847
|
xhrState: 200,
|
|
12855
12848
|
timeout: 1e3 * 30,
|
|
12856
|
-
|
|
12857
|
-
|
|
12849
|
+
preview: true,
|
|
12850
|
+
deletable: true,
|
|
12858
12851
|
maxDuration: 10,
|
|
12859
|
-
|
|
12852
|
+
beforeDelete: (file, files) => {
|
|
12860
12853
|
return true;
|
|
12861
12854
|
}
|
|
12862
12855
|
};
|
|
@@ -12880,26 +12873,27 @@ const InternalUploader = (props, ref) => {
|
|
|
12880
12873
|
const {
|
|
12881
12874
|
children,
|
|
12882
12875
|
uploadIcon,
|
|
12883
|
-
|
|
12884
|
-
uploadIconTip,
|
|
12876
|
+
uploadLabel,
|
|
12885
12877
|
accept,
|
|
12886
12878
|
name,
|
|
12887
12879
|
camera,
|
|
12888
|
-
|
|
12889
|
-
|
|
12880
|
+
defaultValue,
|
|
12881
|
+
value,
|
|
12882
|
+
previewType,
|
|
12883
|
+
imageFit,
|
|
12890
12884
|
disabled,
|
|
12891
12885
|
multiple,
|
|
12892
12886
|
url,
|
|
12893
|
-
|
|
12887
|
+
previewUrl,
|
|
12894
12888
|
headers,
|
|
12895
12889
|
timeout: timeout2,
|
|
12896
12890
|
method,
|
|
12897
12891
|
xhrState,
|
|
12898
12892
|
data,
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12893
|
+
preview,
|
|
12894
|
+
deletable,
|
|
12895
|
+
maxCount,
|
|
12896
|
+
maxFileSize,
|
|
12903
12897
|
mediaType,
|
|
12904
12898
|
className,
|
|
12905
12899
|
autoUpload,
|
|
@@ -12907,7 +12901,7 @@ const InternalUploader = (props, ref) => {
|
|
|
12907
12901
|
sourceType,
|
|
12908
12902
|
maxDuration,
|
|
12909
12903
|
onStart,
|
|
12910
|
-
|
|
12904
|
+
onDelete,
|
|
12911
12905
|
onChange,
|
|
12912
12906
|
onFileItemClick,
|
|
12913
12907
|
onProgress,
|
|
@@ -12915,22 +12909,21 @@ const InternalUploader = (props, ref) => {
|
|
|
12915
12909
|
onUpdate,
|
|
12916
12910
|
onFailure,
|
|
12917
12911
|
onOversize,
|
|
12918
|
-
|
|
12919
|
-
|
|
12912
|
+
beforeXhrUpload,
|
|
12913
|
+
beforeDelete,
|
|
12920
12914
|
...restProps
|
|
12921
12915
|
} = {
|
|
12922
12916
|
...defaultProps$K,
|
|
12923
12917
|
...props
|
|
12924
12918
|
};
|
|
12925
|
-
const [fileList, setFileList] = useState([]);
|
|
12919
|
+
const [fileList, setFileList] = useState(defaultValue || []);
|
|
12926
12920
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
12927
12921
|
useEffect(() => {
|
|
12928
|
-
if (
|
|
12929
|
-
setFileList(
|
|
12922
|
+
if (value) {
|
|
12923
|
+
setFileList(value);
|
|
12930
12924
|
}
|
|
12931
|
-
}, [
|
|
12932
|
-
const
|
|
12933
|
-
const classes = classNames(className, b2(""));
|
|
12925
|
+
}, [value]);
|
|
12926
|
+
const classes = classNames(className, "nut-uploader");
|
|
12934
12927
|
useImperativeHandle(ref, () => ({
|
|
12935
12928
|
submit: () => {
|
|
12936
12929
|
Promise.all(uploadQueue).then((res) => {
|
|
@@ -12971,7 +12964,7 @@ const InternalUploader = (props, ref) => {
|
|
|
12971
12964
|
if (getEnv() === "WEAPP") {
|
|
12972
12965
|
chooseMedia({
|
|
12973
12966
|
/** 最多可以选择的文件个数 */
|
|
12974
|
-
count: multiple ?
|
|
12967
|
+
count: multiple ? maxCount * 1 - fileList.length : 1,
|
|
12975
12968
|
/** 文件类型 */
|
|
12976
12969
|
mediaType,
|
|
12977
12970
|
/** 图片和视频选择的来源 */
|
|
@@ -12992,7 +12985,7 @@ const InternalUploader = (props, ref) => {
|
|
|
12992
12985
|
} else {
|
|
12993
12986
|
chooseImage({
|
|
12994
12987
|
// 选择数量
|
|
12995
|
-
count: multiple ?
|
|
12988
|
+
count: multiple ? maxCount * 1 - fileList.length : 1,
|
|
12996
12989
|
// 可以指定是原图还是压缩图,默认二者都有
|
|
12997
12990
|
sizeType,
|
|
12998
12991
|
sourceType,
|
|
@@ -13014,7 +13007,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13014
13007
|
uploadOption.xhrState = xhrState;
|
|
13015
13008
|
uploadOption.headers = headers;
|
|
13016
13009
|
uploadOption.taroFilePath = fileItem.path;
|
|
13017
|
-
uploadOption.beforeXhrUpload =
|
|
13010
|
+
uploadOption.beforeXhrUpload = beforeXhrUpload;
|
|
13018
13011
|
uploadOption.onStart = (option) => {
|
|
13019
13012
|
clearUploadQueue(index);
|
|
13020
13013
|
setFileList((fileList2) => {
|
|
@@ -13113,8 +13106,8 @@ const InternalUploader = (props, ref) => {
|
|
|
13113
13106
|
}
|
|
13114
13107
|
if (getEnv() === "WEB") {
|
|
13115
13108
|
const formData = new FormData();
|
|
13116
|
-
for (const [key,
|
|
13117
|
-
formData.append(key,
|
|
13109
|
+
for (const [key, value2] of Object.entries(data)) {
|
|
13110
|
+
formData.append(key, value2);
|
|
13118
13111
|
}
|
|
13119
13112
|
formData.append(name, file.originalFileObj);
|
|
13120
13113
|
fileItem.name = (_a = file.originalFileObj) == null ? void 0 : _a.name;
|
|
@@ -13123,7 +13116,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13123
13116
|
} else {
|
|
13124
13117
|
fileItem.formData = data;
|
|
13125
13118
|
}
|
|
13126
|
-
if (
|
|
13119
|
+
if (preview) {
|
|
13127
13120
|
fileItem.url = fileType == "video" ? file.thumbTempFilePath : filepath;
|
|
13128
13121
|
}
|
|
13129
13122
|
fileList.push(fileItem);
|
|
@@ -13132,11 +13125,11 @@ const InternalUploader = (props, ref) => {
|
|
|
13132
13125
|
});
|
|
13133
13126
|
};
|
|
13134
13127
|
const filterFiles = (files) => {
|
|
13135
|
-
const
|
|
13136
|
-
const
|
|
13128
|
+
const maximum = props.maxCount * 1;
|
|
13129
|
+
const maximize = props.maxFileSize * 1;
|
|
13137
13130
|
const oversizes = new Array();
|
|
13138
13131
|
const filterFile = files.filter((file) => {
|
|
13139
|
-
if (file.size >
|
|
13132
|
+
if (file.size > maximize) {
|
|
13140
13133
|
oversizes.push(file);
|
|
13141
13134
|
return false;
|
|
13142
13135
|
}
|
|
@@ -13146,19 +13139,19 @@ const InternalUploader = (props, ref) => {
|
|
|
13146
13139
|
onOversize && onOversize(files);
|
|
13147
13140
|
}
|
|
13148
13141
|
const currentFileLength = filterFile.length + fileList.length;
|
|
13149
|
-
if (currentFileLength >
|
|
13150
|
-
filterFile.splice(filterFile.length - (currentFileLength -
|
|
13142
|
+
if (currentFileLength > maximum) {
|
|
13143
|
+
filterFile.splice(filterFile.length - (currentFileLength - maximum));
|
|
13151
13144
|
}
|
|
13152
13145
|
return filterFile;
|
|
13153
13146
|
};
|
|
13154
13147
|
const deleted = (file, index) => {
|
|
13155
13148
|
fileList.splice(index, 1);
|
|
13156
|
-
|
|
13149
|
+
onDelete && onDelete(file, fileList);
|
|
13157
13150
|
setFileList([...fileList]);
|
|
13158
13151
|
};
|
|
13159
|
-
const
|
|
13152
|
+
const onDeleteItem = (file, index) => {
|
|
13160
13153
|
clearUploadQueue(index);
|
|
13161
|
-
funcInterceptor(
|
|
13154
|
+
funcInterceptor(beforeDelete, {
|
|
13162
13155
|
args: [file, fileList],
|
|
13163
13156
|
done: () => deleted(file, index)
|
|
13164
13157
|
});
|
|
@@ -13192,20 +13185,20 @@ const InternalUploader = (props, ref) => {
|
|
|
13192
13185
|
children: [children && /* @__PURE__ */ jsx("div", {
|
|
13193
13186
|
className: "nut-uploader__slot",
|
|
13194
13187
|
children: /* @__PURE__ */ jsxs(Fragment, {
|
|
13195
|
-
children: [children,
|
|
13188
|
+
children: [children, maxCount > fileList.length && /* @__PURE__ */ jsx(Button, {
|
|
13196
13189
|
className: "nut-uploader__input",
|
|
13197
13190
|
onClick: _chooseImage
|
|
13198
13191
|
})]
|
|
13199
13192
|
})
|
|
13200
13193
|
}), fileList.length !== 0 && fileList.map((item, index) => {
|
|
13201
13194
|
return /* @__PURE__ */ jsxs("div", {
|
|
13202
|
-
className: `nut-uploader__preview ${
|
|
13203
|
-
children: [
|
|
13195
|
+
className: `nut-uploader__preview ${previewType}`,
|
|
13196
|
+
children: [previewType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
|
|
13204
13197
|
className: "nut-uploader__preview-img",
|
|
13205
|
-
children: [
|
|
13198
|
+
children: [deletable && /* @__PURE__ */ jsx(a$m, {
|
|
13206
13199
|
color: "rgba(0,0,0,0.6)",
|
|
13207
13200
|
className: "close",
|
|
13208
|
-
onClick: () =>
|
|
13201
|
+
onClick: () => onDeleteItem(item, index)
|
|
13209
13202
|
}), item.status === "ready" ? /* @__PURE__ */ jsx("div", {
|
|
13210
13203
|
className: "nut-uploader__preview__progress",
|
|
13211
13204
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -13225,15 +13218,18 @@ const InternalUploader = (props, ref) => {
|
|
|
13225
13218
|
}), item.type.includes("image") ? /* @__PURE__ */ jsx(Fragment, {
|
|
13226
13219
|
children: item.url && /* @__PURE__ */ jsx(Image$2, {
|
|
13227
13220
|
className: "nut-uploader__preview-img__c",
|
|
13221
|
+
style: {
|
|
13222
|
+
objectFit: imageFit
|
|
13223
|
+
},
|
|
13228
13224
|
mode: "aspectFit",
|
|
13229
13225
|
src: item.url,
|
|
13230
13226
|
onClick: () => handleItemClick(item)
|
|
13231
13227
|
})
|
|
13232
13228
|
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
13233
|
-
children:
|
|
13229
|
+
children: previewUrl ? /* @__PURE__ */ jsx(Image$2, {
|
|
13234
13230
|
className: "nut-uploader__preview-img__c",
|
|
13235
13231
|
mode: "aspectFit",
|
|
13236
|
-
src:
|
|
13232
|
+
src: previewUrl,
|
|
13237
13233
|
onClick: () => handleItemClick(item)
|
|
13238
13234
|
}) : /* @__PURE__ */ jsx("div", {
|
|
13239
13235
|
className: "nut-uploader__preview-img__file",
|
|
@@ -13249,16 +13245,16 @@ const InternalUploader = (props, ref) => {
|
|
|
13249
13245
|
className: "tips",
|
|
13250
13246
|
children: item.name
|
|
13251
13247
|
}) : null]
|
|
13252
|
-
}),
|
|
13248
|
+
}), previewType === "list" && /* @__PURE__ */ jsxs("div", {
|
|
13253
13249
|
className: "nut-uploader__preview-list",
|
|
13254
13250
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
13255
13251
|
className: `nut-uploader__preview-img__file__name ${item.status}`,
|
|
13256
13252
|
onClick: () => handleItemClick(item),
|
|
13257
13253
|
children: [/* @__PURE__ */ jsx(a$h, {}), " ", item.name]
|
|
13258
|
-
}),
|
|
13254
|
+
}), deletable && /* @__PURE__ */ jsx(a$o, {
|
|
13259
13255
|
color: "#808080",
|
|
13260
13256
|
className: "nut-uploader__preview-img__file__del",
|
|
13261
|
-
onClick: () =>
|
|
13257
|
+
onClick: () => onDeleteItem(item, index)
|
|
13262
13258
|
}), item.status === "uploading" && /* @__PURE__ */ jsx(Progress, {
|
|
13263
13259
|
size: "small",
|
|
13264
13260
|
percentage: item.percentage,
|
|
@@ -13267,16 +13263,16 @@ const InternalUploader = (props, ref) => {
|
|
|
13267
13263
|
})]
|
|
13268
13264
|
})]
|
|
13269
13265
|
}, item.uid);
|
|
13270
|
-
}),
|
|
13271
|
-
className: `nut-uploader__upload ${
|
|
13266
|
+
}), maxCount > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ jsxs("div", {
|
|
13267
|
+
className: `nut-uploader__upload ${previewType} ${disabled ? "nut-uploader__upload-disabled" : ""}`,
|
|
13272
13268
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
13273
13269
|
className: "nut-uploader__icon",
|
|
13274
13270
|
children: [uploadIcon || /* @__PURE__ */ jsx(a$b, {
|
|
13275
|
-
size:
|
|
13271
|
+
size: "20px",
|
|
13276
13272
|
color: "#808080"
|
|
13277
13273
|
}), /* @__PURE__ */ jsx("span", {
|
|
13278
13274
|
className: "nut-uploader__icon-tip",
|
|
13279
|
-
children:
|
|
13275
|
+
children: uploadLabel
|
|
13280
13276
|
})]
|
|
13281
13277
|
}), /* @__PURE__ */ jsx(Button, {
|
|
13282
13278
|
className: "nut-uploader__input",
|
|
@@ -21236,7 +21232,7 @@ const ImagePreview = (props) => {
|
|
|
21236
21232
|
};
|
|
21237
21233
|
return /* @__PURE__ */ jsxs(Popup, {
|
|
21238
21234
|
visible: showPop,
|
|
21239
|
-
|
|
21235
|
+
className: "custom-pop",
|
|
21240
21236
|
style: {
|
|
21241
21237
|
width: "100%"
|
|
21242
21238
|
},
|