@nutui/nutui-react-taro 2.6.15 → 2.6.17
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 +45 -14
- package/README.md +2 -2
- package/dist/esm/ActionSheet.js +1 -1
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Cell/style/style.css +1 -1
- package/dist/esm/Cell.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Drag.js +1 -1
- package/dist/esm/Ellipsis.js +1 -1
- package/dist/esm/FixedNav.js +1 -1
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/Form.js +2 -2
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/InputNumber.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Overlay.js +1 -1
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/PullToRefresh.js +1 -1
- package/dist/esm/ShortPassword.js +1 -1
- package/dist/esm/SideNavBar.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/TimeSelect.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{actionsheet.taro-CJjNsNrH.js → actionsheet.taro-CQ3sJY3B.js} +1 -1
- package/dist/esm/{address.taro-BYzOGUEN.js → address.taro-Old6uBAn.js} +2 -2
- package/dist/esm/{calendar.taro-BXrHr8bg.js → calendar.taro-C4UvVkgw.js} +1 -1
- package/dist/esm/{cascader.taro-jxe42b68.js → cascader.taro-BNw6H5ue.js} +2 -2
- package/dist/esm/{cell.taro-CVFlcls2.js → cell.taro-DWLhb5m6.js} +3 -3
- package/dist/esm/{datepicker.taro-BxaZ3Fjv.js → datepicker.taro-C1wMTysn.js} +1 -1
- package/dist/esm/{dialog.taro-BW9D2Gsr.js → dialog.taro-BY2KfQh1.js} +1 -1
- package/dist/esm/{drag.taro-B_TO4Nnu.js → drag.taro-B_sfzmtW.js} +2 -2
- package/dist/esm/{ellipsis.taro-cMTr1Wcw.js → ellipsis.taro-Ck2rumQ6.js} +3 -3
- package/dist/esm/{fixednav.taro-D3KnhYoI.js → fixednav.taro-C3iUeag8.js} +1 -1
- package/dist/esm/{formitem.taro-Dmt5-wxG.js → formitem.taro-CEWRz5EJ.js} +6 -6
- package/dist/esm/{get-scroll-parent-DB1VRg11.js → get-scroll-parent-9ZDWApX2.js} +0 -1
- package/dist/esm/{imagepreview.taro-CF-CCJ1Q.js → imagepreview.taro-CJDHziHn.js} +27 -18
- package/dist/esm/{inputnumber.taro-WN5Drnyz.js → inputnumber.taro-D9mteLSI.js} +26 -9
- package/dist/esm/{menu.taro-BeuoJcj7.js → menu.taro-Cw_lCHDb.js} +10 -3
- package/dist/esm/{menuitem.taro-DMV3j4DK.js → menuitem.taro-DqLGsBUc.js} +2 -2
- package/dist/esm/{numberkeyboard.taro-BA0iCeGP.js → numberkeyboard.taro-B-FEM91t.js} +39 -28
- package/dist/esm/nutui-react.es.js +29 -29
- package/dist/esm/{overlay.taro-C2t82CZz.js → overlay.taro-B5s6rmEf.js} +2 -16
- package/dist/esm/{picker.taro-CafNRRO5.js → picker.taro-Cu8B-fNC.js} +2 -3
- package/dist/esm/{popover.taro-B_FJgU0z.js → popover.taro-DrC9HQ1E.js} +1 -1
- package/dist/esm/{popup.taro-CR3JyuJV.js → popup.taro-_E52-0su.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-BScP6uPx.js → pulltorefresh.taro-DSr2dBjM.js} +5 -1
- package/dist/esm/{shortpassword.taro-DpdtRsQ-.js → shortpassword.taro-CmPaHe0E.js} +1 -1
- package/dist/esm/{sidenavbar.taro-5BmrYFtP.js → sidenavbar.taro-BWB1yd3c.js} +1 -1
- package/dist/esm/{sticky.taro-Zbz7wQH8.js → sticky.taro-2Vup8HR8.js} +1 -1
- package/dist/esm/{tabs.taro-B2D3AtVV.js → tabs.taro-8X51sTol.js} +2 -0
- package/dist/esm/{timeselect.taro-DncKbp3l.js → timeselect.taro-CgcPLf0z.js} +1 -1
- package/dist/esm/{toast.taro-CYk6UERn.js → toast.taro-3B6uFLDu.js} +1 -1
- package/dist/esm/{tour.taro-SPMrhDA9.js → tour.taro-D88VKjAl.js} +1 -1
- package/dist/esm/{uploader.taro-DfO2HWvy.js → uploader.taro-0QYFT-E8.js} +5 -3
- 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/tr-TR.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.es.js +231 -141
- package/dist/nutui.react.umd.js +231 -141
- package/dist/packages/cell/cell.scss +20 -0
- package/dist/style.css +1 -1
- package/dist/types/packages/avatargroup/context.d.ts +0 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +2 -1
- package/dist/types/packages/cell/cell.taro.d.ts +7 -2
- package/dist/types/packages/cellgroup/context.d.ts +0 -1
- package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
- package/dist/types/packages/collapse/context.d.ts +0 -1
- package/dist/types/packages/form/context.d.ts +0 -1
- package/dist/types/packages/formitem/formitem.d.ts +1 -0
- package/dist/types/packages/formitem/formitem.taro.d.ts +5 -0
- package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
- package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
- package/dist/types/packages/menuitem/menuitem.d.ts +1 -0
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +5 -0
- package/dist/types/packages/popover/types.d.ts +0 -1
- package/dist/types/packages/radiogroup/context.d.ts +1 -1
- package/dist/types/packages/row/UserContext.d.ts +0 -1
- package/dist/types/packages/sidenavbar/context.d.ts +0 -1
- package/dist/types/packages/steps/context.d.ts +0 -1
- package/dist/types/packages/swiper/context.d.ts +0 -1
- package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
- package/dist/types/packages/uploader/uploader.d.ts +1 -1
- package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
- package/dist/types/packages/virtuallist/utils.d.ts +2 -2
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -1
- package/package.json +1 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v2.6.
|
|
2
|
+
* @nutui/nutui-react-taro v2.6.17 Fri Aug 30 2024 14:09:01 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -127,6 +127,7 @@ const S = m;
|
|
|
127
127
|
const g$6 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "ArrowDown", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgMjg5LjgzYTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM0IDYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDAgNjAuMzYgMGwzODQtMzg0YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM2LTYwLjM0TDUxMiA2NDMuNjd6Ii8+PC9zdmc+" });
|
|
128
128
|
g$6.defaultProps = k;
|
|
129
129
|
const g$5 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "ArrowLeft", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik03MTIuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjMzLTYwLjM0bC0zODQgMzg0YTQyLjY3IDQyLjY3IDAgMCAwIDAgNjAuMzZsMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMCA2MC4zMy02MC4zNkwzNTkgNTEyeiIvPjwvc3ZnPg==" });
|
|
130
|
+
g$5.defaultProps = k;
|
|
130
131
|
const a$2 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "ArrowUp", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgNzM0LjE3YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM0LTYwLjM0bDM4NC0zODRhNDIuNjcgNDIuNjcgMCAwIDEgNjAuMzYgMGwzODQgMzg0YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM2IDYwLjM0TDUxMiAzODAuMzN6Ii8+PC9zdmc+" });
|
|
131
132
|
a$2.defaultProps = k;
|
|
132
133
|
const g$4 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "CheckChecked", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik01MDYuNjUgMi44MkMyMjguMDEgMi44Mi4wMyAyMzAuOC4wMyA1MDkuNDRzMjI3Ljk4IDUwNi42MiA1MDYuNjIgNTA2LjYyIDUwNi42Mi0yMjcuOTggNTA2LjYzLTUwNi42MlM3ODguMTEgMi44MiA1MDYuNjUgMi44Mm0wIDc4OC4wOGMtMTU0LjggMC0yODEuNDYtMTI2LjY2LTI4MS40NS0yODEuNDZzMTI2LjY2LTI4MS40NiAyODEuNDUtMjgxLjQ2IDI4MS40NiAxMjYuNjYgMjgxLjQ2IDI4MS40NlM2NjEuNDUgNzkwLjkgNTA2LjY1IDc5MC45Ii8+PHBhdGggZmlsbD0iIzMzMyIgZD0iTTM4MCA1MDkuNDRhMTI2LjY2IDEyNi42NiAwIDEgMCAyNTMuMzEgMCAxMjYuNjYgMTI2LjY2IDAgMSAwLTI1My4zMSAwIi8+PC9zdmc+" });
|
|
@@ -196,7 +197,7 @@ const ComponentDefaults = {
|
|
|
196
197
|
style: {}
|
|
197
198
|
};
|
|
198
199
|
const prefixCls$2 = "nut-button";
|
|
199
|
-
const defaultProps$
|
|
200
|
+
const defaultProps$1v = {
|
|
200
201
|
...ComponentDefaults,
|
|
201
202
|
color: "",
|
|
202
203
|
type: "default",
|
|
@@ -231,7 +232,7 @@ const Button = React__default.forwardRef(
|
|
|
231
232
|
onClick,
|
|
232
233
|
...rest
|
|
233
234
|
} = {
|
|
234
|
-
...defaultProps$
|
|
235
|
+
...defaultProps$1v,
|
|
235
236
|
...props
|
|
236
237
|
};
|
|
237
238
|
const getStyle = useCallback(() => {
|
|
@@ -298,7 +299,7 @@ const Button = React__default.forwardRef(
|
|
|
298
299
|
);
|
|
299
300
|
Button.displayName = "NutButton";
|
|
300
301
|
const CellGroupContext = createContext(null);
|
|
301
|
-
const defaultProps$
|
|
302
|
+
const defaultProps$1u = {
|
|
302
303
|
...ComponentDefaults,
|
|
303
304
|
title: "",
|
|
304
305
|
description: "",
|
|
@@ -307,7 +308,7 @@ const defaultProps$1t = {
|
|
|
307
308
|
const classPrefix$r = "nut-cell-group";
|
|
308
309
|
const CellGroup = (props) => {
|
|
309
310
|
const { children, className, title, description, divider, ...rest } = {
|
|
310
|
-
...defaultProps$
|
|
311
|
+
...defaultProps$1u,
|
|
311
312
|
...props
|
|
312
313
|
};
|
|
313
314
|
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React__default.createElement(
|
|
@@ -319,13 +320,14 @@ const CellGroup = (props) => {
|
|
|
319
320
|
));
|
|
320
321
|
};
|
|
321
322
|
CellGroup.displayName = "NutCellGroup";
|
|
322
|
-
const defaultProps$
|
|
323
|
+
const defaultProps$1t = {
|
|
323
324
|
...ComponentDefaults,
|
|
324
325
|
title: null,
|
|
325
326
|
description: null,
|
|
326
327
|
extra: null,
|
|
327
328
|
radius: "6px",
|
|
328
329
|
align: "flex-start",
|
|
330
|
+
clickable: false,
|
|
329
331
|
onClick: (event) => {
|
|
330
332
|
}
|
|
331
333
|
};
|
|
@@ -342,9 +344,10 @@ const Cell = (props) => {
|
|
|
342
344
|
align,
|
|
343
345
|
className,
|
|
344
346
|
style,
|
|
347
|
+
clickable,
|
|
345
348
|
...rest
|
|
346
349
|
} = {
|
|
347
|
-
...defaultProps$
|
|
350
|
+
...defaultProps$1t,
|
|
348
351
|
...props
|
|
349
352
|
};
|
|
350
353
|
const handleClick = (event) => {
|
|
@@ -361,7 +364,7 @@ const Cell = (props) => {
|
|
|
361
364
|
return /* @__PURE__ */ React__default.createElement(
|
|
362
365
|
"div",
|
|
363
366
|
{
|
|
364
|
-
className: classNames(classPrefix$q, className)
|
|
367
|
+
className: `${classNames(classPrefix$q, className, clickable ? `${classPrefix$q}-clickable` : "")}`,
|
|
365
368
|
onClick: (event) => handleClick(event),
|
|
366
369
|
style: baseStyle,
|
|
367
370
|
...rest
|
|
@@ -1519,7 +1522,7 @@ ConfigProvider.displayName = "NutConfigProvider";
|
|
|
1519
1522
|
const pxCheck = (value) => {
|
|
1520
1523
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1521
1524
|
};
|
|
1522
|
-
const defaultProps$
|
|
1525
|
+
const defaultProps$1s = {
|
|
1523
1526
|
src: "",
|
|
1524
1527
|
error: true,
|
|
1525
1528
|
loading: true
|
|
@@ -1538,7 +1541,7 @@ const Image$1 = (props) => {
|
|
|
1538
1541
|
onLoad,
|
|
1539
1542
|
onError,
|
|
1540
1543
|
...rest
|
|
1541
|
-
} = { ...defaultProps$
|
|
1544
|
+
} = { ...defaultProps$1s, ...props };
|
|
1542
1545
|
const [innerLoading, setInnerLoading] = useState(true);
|
|
1543
1546
|
const [isError, setIsError] = useState(false);
|
|
1544
1547
|
const handleLoad = (e2) => {
|
|
@@ -1610,7 +1613,7 @@ function _objectWithoutPropertiesLoose(r, e2) {
|
|
|
1610
1613
|
if (null == r) return {};
|
|
1611
1614
|
var t = {};
|
|
1612
1615
|
for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
|
|
1613
|
-
if (e2.
|
|
1616
|
+
if (e2.includes(n2)) continue;
|
|
1614
1617
|
t[n2] = r[n2];
|
|
1615
1618
|
}
|
|
1616
1619
|
return t;
|
|
@@ -3557,7 +3560,7 @@ const Overlay = (props) => {
|
|
|
3557
3560
|
};
|
|
3558
3561
|
Overlay.displayName = "NutOverlay";
|
|
3559
3562
|
const DataContext$1 = createContext({});
|
|
3560
|
-
const defaultProps$
|
|
3563
|
+
const defaultProps$1r = {
|
|
3561
3564
|
...ComponentDefaults,
|
|
3562
3565
|
span: "24",
|
|
3563
3566
|
offset: "0",
|
|
@@ -3565,7 +3568,7 @@ const defaultProps$1q = {
|
|
|
3565
3568
|
};
|
|
3566
3569
|
const Col = (props) => {
|
|
3567
3570
|
const { className, style, span, offset, children, onClick } = {
|
|
3568
|
-
...defaultProps$
|
|
3571
|
+
...defaultProps$1r,
|
|
3569
3572
|
...props
|
|
3570
3573
|
};
|
|
3571
3574
|
const [colName, setColName] = useState("");
|
|
@@ -3598,7 +3601,7 @@ const Col = (props) => {
|
|
|
3598
3601
|
);
|
|
3599
3602
|
};
|
|
3600
3603
|
Col.displayName = "NutCol";
|
|
3601
|
-
const defaultProps$
|
|
3604
|
+
const defaultProps$1q = {
|
|
3602
3605
|
...ComponentDefaults,
|
|
3603
3606
|
contentPosition: "center",
|
|
3604
3607
|
direction: "horizontal"
|
|
@@ -3606,7 +3609,7 @@ const defaultProps$1p = {
|
|
|
3606
3609
|
const classPrefix$o = `nut-divider`;
|
|
3607
3610
|
const Divider = (props) => {
|
|
3608
3611
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3609
|
-
...defaultProps$
|
|
3612
|
+
...defaultProps$1q,
|
|
3610
3613
|
...props
|
|
3611
3614
|
};
|
|
3612
3615
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -3627,7 +3630,7 @@ const gridContext = {
|
|
|
3627
3630
|
}
|
|
3628
3631
|
};
|
|
3629
3632
|
const GridContext = React__default.createContext(gridContext);
|
|
3630
|
-
const defaultProps$
|
|
3633
|
+
const defaultProps$1p = {
|
|
3631
3634
|
text: "",
|
|
3632
3635
|
columns: 4,
|
|
3633
3636
|
gap: 0,
|
|
@@ -3653,7 +3656,7 @@ const GridItem = (props) => {
|
|
|
3653
3656
|
onClick,
|
|
3654
3657
|
...rest
|
|
3655
3658
|
} = {
|
|
3656
|
-
...defaultProps$
|
|
3659
|
+
...defaultProps$1p,
|
|
3657
3660
|
...props
|
|
3658
3661
|
};
|
|
3659
3662
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -3712,7 +3715,7 @@ const GridItem = (props) => {
|
|
|
3712
3715
|
);
|
|
3713
3716
|
};
|
|
3714
3717
|
GridItem.displayName = "NutGridItem";
|
|
3715
|
-
const defaultProps$
|
|
3718
|
+
const defaultProps$1o = {
|
|
3716
3719
|
columns: 4,
|
|
3717
3720
|
gap: 0,
|
|
3718
3721
|
center: true,
|
|
@@ -3733,7 +3736,7 @@ const Grid = (props) => {
|
|
|
3733
3736
|
className,
|
|
3734
3737
|
onClick,
|
|
3735
3738
|
...rest
|
|
3736
|
-
} = { ...defaultProps$
|
|
3739
|
+
} = { ...defaultProps$1o, ...props };
|
|
3737
3740
|
const childrenDom = React__default.Children.toArray(children);
|
|
3738
3741
|
const classPrefix2 = "nut-grid";
|
|
3739
3742
|
const rootClass = () => {
|
|
@@ -3769,14 +3772,14 @@ const Grid = (props) => {
|
|
|
3769
3772
|
};
|
|
3770
3773
|
Grid.displayName = "NutGrid";
|
|
3771
3774
|
Grid.Item = GridItem;
|
|
3772
|
-
const defaultProps$
|
|
3775
|
+
const defaultProps$1n = {};
|
|
3773
3776
|
const Layout = (props) => {
|
|
3774
|
-
({ ...defaultProps$
|
|
3777
|
+
({ ...defaultProps$1n, ...props });
|
|
3775
3778
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
|
|
3776
3779
|
};
|
|
3777
3780
|
Layout.displayName = "NutLayout";
|
|
3778
3781
|
const classPrefix$n = "nut-row";
|
|
3779
|
-
const defaultProps$
|
|
3782
|
+
const defaultProps$1m = {
|
|
3780
3783
|
...ComponentDefaults,
|
|
3781
3784
|
type: "",
|
|
3782
3785
|
justify: "start",
|
|
@@ -3796,7 +3799,7 @@ const Row = (props) => {
|
|
|
3796
3799
|
gutter,
|
|
3797
3800
|
onClick
|
|
3798
3801
|
} = {
|
|
3799
|
-
...defaultProps$
|
|
3802
|
+
...defaultProps$1m,
|
|
3800
3803
|
...props
|
|
3801
3804
|
};
|
|
3802
3805
|
const getClass = (prefix, type22) => {
|
|
@@ -3830,12 +3833,12 @@ const Row = (props) => {
|
|
|
3830
3833
|
};
|
|
3831
3834
|
Row.displayName = "NutRow";
|
|
3832
3835
|
const prefixCls$1 = "nut-space";
|
|
3833
|
-
const defaultProps$
|
|
3836
|
+
const defaultProps$1l = {
|
|
3834
3837
|
direction: "horizontal"
|
|
3835
3838
|
};
|
|
3836
3839
|
const Space = (props) => {
|
|
3837
3840
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3838
|
-
...defaultProps$
|
|
3841
|
+
...defaultProps$1l,
|
|
3839
3842
|
...props
|
|
3840
3843
|
};
|
|
3841
3844
|
const cls = classNames(
|
|
@@ -3927,7 +3930,7 @@ const getRectByTaro = async (element) => {
|
|
|
3927
3930
|
}
|
|
3928
3931
|
return Promise.resolve(makeRect(0, 0));
|
|
3929
3932
|
};
|
|
3930
|
-
const defaultProps$
|
|
3933
|
+
const defaultProps$1k = {
|
|
3931
3934
|
...ComponentDefaults,
|
|
3932
3935
|
position: "top",
|
|
3933
3936
|
zIndex: 900
|
|
@@ -3944,7 +3947,7 @@ const Sticky = (props) => {
|
|
|
3944
3947
|
className,
|
|
3945
3948
|
onChange,
|
|
3946
3949
|
...rest
|
|
3947
|
-
} = { ...defaultProps$
|
|
3950
|
+
} = { ...defaultProps$1k, ...props };
|
|
3948
3951
|
const stickyRef = useRef(null);
|
|
3949
3952
|
const rootRef = useRef(null);
|
|
3950
3953
|
const [rootRect, setRootRect] = useState({});
|
|
@@ -4060,7 +4063,7 @@ const SafeArea = (props) => {
|
|
|
4060
4063
|
);
|
|
4061
4064
|
};
|
|
4062
4065
|
SafeArea.displayName = "NutSafeArea";
|
|
4063
|
-
const defaultProps$
|
|
4066
|
+
const defaultProps$1j = {
|
|
4064
4067
|
...ComponentDefaults,
|
|
4065
4068
|
threshold: 200,
|
|
4066
4069
|
zIndex: 900,
|
|
@@ -4069,7 +4072,7 @@ const defaultProps$1i = {
|
|
|
4069
4072
|
const BackTop = (props) => {
|
|
4070
4073
|
const rtl = useRtl();
|
|
4071
4074
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
4072
|
-
...defaultProps$
|
|
4075
|
+
...defaultProps$1j,
|
|
4073
4076
|
...props
|
|
4074
4077
|
};
|
|
4075
4078
|
const classPrefix2 = "nut-backtop";
|
|
@@ -4113,7 +4116,7 @@ const BackTop = (props) => {
|
|
|
4113
4116
|
};
|
|
4114
4117
|
BackTop.displayName = "NutBackTop";
|
|
4115
4118
|
const elevatorContext = createContext({});
|
|
4116
|
-
const defaultProps$
|
|
4119
|
+
const defaultProps$1i = {
|
|
4117
4120
|
...ComponentDefaults,
|
|
4118
4121
|
height: "200px",
|
|
4119
4122
|
floorKey: "title",
|
|
@@ -4140,7 +4143,7 @@ const Elevator = (props) => {
|
|
|
4140
4143
|
children,
|
|
4141
4144
|
...rest
|
|
4142
4145
|
} = {
|
|
4143
|
-
...defaultProps$
|
|
4146
|
+
...defaultProps$1i,
|
|
4144
4147
|
...props
|
|
4145
4148
|
};
|
|
4146
4149
|
const classPrefix2 = "nut-elevator";
|
|
@@ -4355,7 +4358,7 @@ const Elevator = (props) => {
|
|
|
4355
4358
|
};
|
|
4356
4359
|
Elevator.displayName = "NutElevator";
|
|
4357
4360
|
Elevator.Context = elevatorContext;
|
|
4358
|
-
const defaultProps$
|
|
4361
|
+
const defaultProps$1h = {
|
|
4359
4362
|
...ComponentDefaults,
|
|
4360
4363
|
activeText: "",
|
|
4361
4364
|
inactiveText: "",
|
|
@@ -4383,7 +4386,7 @@ const FixedNav = (props) => {
|
|
|
4383
4386
|
content,
|
|
4384
4387
|
...rest
|
|
4385
4388
|
} = {
|
|
4386
|
-
...defaultProps$
|
|
4389
|
+
...defaultProps$1h,
|
|
4387
4390
|
...props
|
|
4388
4391
|
};
|
|
4389
4392
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -4436,7 +4439,7 @@ const FixedNav = (props) => {
|
|
|
4436
4439
|
);
|
|
4437
4440
|
};
|
|
4438
4441
|
FixedNav.displayName = "NutFixedNav";
|
|
4439
|
-
const defaultProps$
|
|
4442
|
+
const defaultProps$1g = {
|
|
4440
4443
|
...ComponentDefaults,
|
|
4441
4444
|
left: "",
|
|
4442
4445
|
right: "",
|
|
@@ -4461,7 +4464,7 @@ const NavBar = (props) => {
|
|
|
4461
4464
|
zIndex,
|
|
4462
4465
|
onBackClick
|
|
4463
4466
|
} = {
|
|
4464
|
-
...defaultProps$
|
|
4467
|
+
...defaultProps$1g,
|
|
4465
4468
|
...props
|
|
4466
4469
|
};
|
|
4467
4470
|
const classPrefix2 = "nut-navbar";
|
|
@@ -4540,7 +4543,7 @@ const NavBar = (props) => {
|
|
|
4540
4543
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement(View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
4541
4544
|
};
|
|
4542
4545
|
NavBar.displayName = "NutNavBar";
|
|
4543
|
-
const defaultProps$
|
|
4546
|
+
const defaultProps$1f = {
|
|
4544
4547
|
...ComponentDefaults,
|
|
4545
4548
|
position: "center",
|
|
4546
4549
|
transition: "",
|
|
@@ -4593,7 +4596,7 @@ const Popup = (props) => {
|
|
|
4593
4596
|
afterShow,
|
|
4594
4597
|
afterClose,
|
|
4595
4598
|
onClick
|
|
4596
|
-
} = { ...defaultProps$
|
|
4599
|
+
} = { ...defaultProps$1f, ...props };
|
|
4597
4600
|
let innerIndex = zIndex || _zIndex;
|
|
4598
4601
|
const [index, setIndex] = useState(innerIndex);
|
|
4599
4602
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
@@ -4735,7 +4738,7 @@ const Popup = (props) => {
|
|
|
4735
4738
|
};
|
|
4736
4739
|
Popup.displayName = "NutPopup";
|
|
4737
4740
|
const OffsetContext = createContext(20);
|
|
4738
|
-
const defaultProps$
|
|
4741
|
+
const defaultProps$1e = {
|
|
4739
4742
|
...ComponentDefaults,
|
|
4740
4743
|
position: "left",
|
|
4741
4744
|
width: "80%"
|
|
@@ -4753,7 +4756,7 @@ const SideNavBar = (props) => {
|
|
|
4753
4756
|
indent,
|
|
4754
4757
|
...rest
|
|
4755
4758
|
} = {
|
|
4756
|
-
...defaultProps$
|
|
4759
|
+
...defaultProps$1e,
|
|
4757
4760
|
...props
|
|
4758
4761
|
};
|
|
4759
4762
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -4811,13 +4814,13 @@ const SideNavBarItem = (props) => {
|
|
|
4811
4814
|
title
|
|
4812
4815
|
);
|
|
4813
4816
|
};
|
|
4814
|
-
const defaultProps$
|
|
4817
|
+
const defaultProps$1d = {
|
|
4815
4818
|
open: true
|
|
4816
4819
|
};
|
|
4817
4820
|
const SubSideNavBar = (props) => {
|
|
4818
4821
|
const classPrefix2 = "nut-subsidenavbar";
|
|
4819
4822
|
const { title, value, children, onClick, open: open2, ...rest } = {
|
|
4820
|
-
...defaultProps$
|
|
4823
|
+
...defaultProps$1d,
|
|
4821
4824
|
...props
|
|
4822
4825
|
};
|
|
4823
4826
|
const [subShow, setSubShow] = useState(open2);
|
|
@@ -4895,7 +4898,7 @@ function usePropsValue({
|
|
|
4895
4898
|
);
|
|
4896
4899
|
return [stateRef.current, setState];
|
|
4897
4900
|
}
|
|
4898
|
-
const defaultProps$
|
|
4901
|
+
const defaultProps$1c = {
|
|
4899
4902
|
...ComponentDefaults,
|
|
4900
4903
|
value: "",
|
|
4901
4904
|
dot: false,
|
|
@@ -4920,7 +4923,7 @@ const Badge = (props) => {
|
|
|
4920
4923
|
color,
|
|
4921
4924
|
fill
|
|
4922
4925
|
} = {
|
|
4923
|
-
...defaultProps$
|
|
4926
|
+
...defaultProps$1c,
|
|
4924
4927
|
...props
|
|
4925
4928
|
};
|
|
4926
4929
|
const classPrefix2 = "nut-badge";
|
|
@@ -4974,7 +4977,7 @@ const Badge = (props) => {
|
|
|
4974
4977
|
};
|
|
4975
4978
|
Badge.displayName = "NutBadge";
|
|
4976
4979
|
const TabbarContext = React__default.createContext(null);
|
|
4977
|
-
const defaultProps$
|
|
4980
|
+
const defaultProps$1b = {
|
|
4978
4981
|
...ComponentDefaults,
|
|
4979
4982
|
title: "",
|
|
4980
4983
|
icon: null,
|
|
@@ -5000,7 +5003,7 @@ const TabbarItem = (props) => {
|
|
|
5000
5003
|
index,
|
|
5001
5004
|
...rest
|
|
5002
5005
|
} = {
|
|
5003
|
-
...defaultProps$
|
|
5006
|
+
...defaultProps$1b,
|
|
5004
5007
|
...props
|
|
5005
5008
|
};
|
|
5006
5009
|
const active = index === (ctx == null ? void 0 : ctx.selectIndex);
|
|
@@ -5038,7 +5041,7 @@ const TabbarItem = (props) => {
|
|
|
5038
5041
|
icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title))
|
|
5039
5042
|
);
|
|
5040
5043
|
};
|
|
5041
|
-
const defaultProps$
|
|
5044
|
+
const defaultProps$1a = {
|
|
5042
5045
|
...ComponentDefaults,
|
|
5043
5046
|
defaultValue: 0,
|
|
5044
5047
|
fixed: false,
|
|
@@ -5061,7 +5064,7 @@ const Tabbar = (props) => {
|
|
|
5061
5064
|
style,
|
|
5062
5065
|
onSwitch
|
|
5063
5066
|
} = {
|
|
5064
|
-
...defaultProps$
|
|
5067
|
+
...defaultProps$1a,
|
|
5065
5068
|
...props
|
|
5066
5069
|
};
|
|
5067
5070
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -5103,14 +5106,14 @@ const Tabbar = (props) => {
|
|
|
5103
5106
|
};
|
|
5104
5107
|
Tabbar.displayName = "NutTabbar";
|
|
5105
5108
|
Tabbar.Item = TabbarItem;
|
|
5106
|
-
const defaultProps$
|
|
5109
|
+
const defaultProps$19 = {
|
|
5107
5110
|
title: "",
|
|
5108
5111
|
value: "",
|
|
5109
5112
|
disabled: false
|
|
5110
5113
|
};
|
|
5111
5114
|
const TabPane = (props) => {
|
|
5112
5115
|
const { children, autoHeightClassName, className, disabled } = {
|
|
5113
|
-
...defaultProps$
|
|
5116
|
+
...defaultProps$19,
|
|
5114
5117
|
...props
|
|
5115
5118
|
};
|
|
5116
5119
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -5151,7 +5154,7 @@ function useUuid() {
|
|
|
5151
5154
|
const idRef = useRef(uniqueId());
|
|
5152
5155
|
return idRef.current;
|
|
5153
5156
|
}
|
|
5154
|
-
const defaultProps$
|
|
5157
|
+
const defaultProps$18 = {
|
|
5155
5158
|
...ComponentDefaults,
|
|
5156
5159
|
tabStyle: {},
|
|
5157
5160
|
activeColor: "",
|
|
@@ -5181,7 +5184,7 @@ const Tabs = (props) => {
|
|
|
5181
5184
|
defaultValue: outerDefaultValue,
|
|
5182
5185
|
...rest
|
|
5183
5186
|
} = {
|
|
5184
|
-
...defaultProps$
|
|
5187
|
+
...defaultProps$18,
|
|
5185
5188
|
...props
|
|
5186
5189
|
};
|
|
5187
5190
|
const uuid = useUuid();
|
|
@@ -5290,6 +5293,7 @@ const Tabs = (props) => {
|
|
|
5290
5293
|
} else {
|
|
5291
5294
|
const left2 = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, 0);
|
|
5292
5295
|
to = left2 - (navRectRef.current.width - titleRect.width) / 2;
|
|
5296
|
+
if (to < 0) return;
|
|
5293
5297
|
to = rtl ? -to : to;
|
|
5294
5298
|
}
|
|
5295
5299
|
nextTick(() => {
|
|
@@ -5404,7 +5408,7 @@ const Tabs = (props) => {
|
|
|
5404
5408
|
};
|
|
5405
5409
|
Tabs.displayName = "NutTabs";
|
|
5406
5410
|
Tabs.TabPane = TabPane;
|
|
5407
|
-
const defaultProps$
|
|
5411
|
+
const defaultProps$17 = {
|
|
5408
5412
|
type: "custom",
|
|
5409
5413
|
existList: [],
|
|
5410
5414
|
defaultIcon: null,
|
|
@@ -5423,7 +5427,7 @@ const ExistRender = (props) => {
|
|
|
5423
5427
|
onSelect,
|
|
5424
5428
|
onSwitch,
|
|
5425
5429
|
...rest
|
|
5426
|
-
} = { ...defaultProps$
|
|
5430
|
+
} = { ...defaultProps$17, ...props };
|
|
5427
5431
|
const classPrefix2 = "nut-address";
|
|
5428
5432
|
const selectedExist = (item) => {
|
|
5429
5433
|
existList.forEach((list, index) => {
|
|
@@ -5585,7 +5589,7 @@ class Tree {
|
|
|
5585
5589
|
return pathNodes;
|
|
5586
5590
|
}
|
|
5587
5591
|
}
|
|
5588
|
-
const defaultProps$
|
|
5592
|
+
const defaultProps$16 = {
|
|
5589
5593
|
...ComponentDefaults,
|
|
5590
5594
|
activeColor: "",
|
|
5591
5595
|
activeIcon: "checklist",
|
|
@@ -5630,7 +5634,7 @@ const InternalCascader = (props, ref) => {
|
|
|
5630
5634
|
onClose,
|
|
5631
5635
|
onChange,
|
|
5632
5636
|
onPathChange
|
|
5633
|
-
} = { ...defaultProps$
|
|
5637
|
+
} = { ...defaultProps$16, ...props };
|
|
5634
5638
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
5635
5639
|
const [optionsData, setOptionsData] = useState([]);
|
|
5636
5640
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -5938,7 +5942,7 @@ const InternalCascader = (props, ref) => {
|
|
|
5938
5942
|
};
|
|
5939
5943
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
5940
5944
|
Cascader.displayName = "NutCascader";
|
|
5941
|
-
const defaultProps$
|
|
5945
|
+
const defaultProps$15 = {
|
|
5942
5946
|
...ComponentDefaults,
|
|
5943
5947
|
visible: false,
|
|
5944
5948
|
type: "custom",
|
|
@@ -5965,7 +5969,7 @@ const CustomRender = (props) => {
|
|
|
5965
5969
|
onPathChange,
|
|
5966
5970
|
...rest
|
|
5967
5971
|
} = {
|
|
5968
|
-
...defaultProps$
|
|
5972
|
+
...defaultProps$15,
|
|
5969
5973
|
...props
|
|
5970
5974
|
};
|
|
5971
5975
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
|
|
@@ -5990,7 +5994,7 @@ const CustomRender = (props) => {
|
|
|
5990
5994
|
}
|
|
5991
5995
|
));
|
|
5992
5996
|
};
|
|
5993
|
-
const defaultProps$
|
|
5997
|
+
const defaultProps$14 = {
|
|
5994
5998
|
...ComponentDefaults,
|
|
5995
5999
|
defaultValue: [],
|
|
5996
6000
|
type: "custom",
|
|
@@ -6032,7 +6036,7 @@ const InternalAddress = (props, ref) => {
|
|
|
6032
6036
|
onSwitch,
|
|
6033
6037
|
...rest
|
|
6034
6038
|
} = {
|
|
6035
|
-
...defaultProps$
|
|
6039
|
+
...defaultProps$14,
|
|
6036
6040
|
...props
|
|
6037
6041
|
};
|
|
6038
6042
|
const classPrefix2 = "nut-address";
|
|
@@ -6370,7 +6374,7 @@ const isEnd = (day, days) => {
|
|
|
6370
6374
|
const isStartAndEnd = (days) => {
|
|
6371
6375
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
6372
6376
|
};
|
|
6373
|
-
const defaultProps$
|
|
6377
|
+
const defaultProps$13 = {
|
|
6374
6378
|
...ComponentDefaults,
|
|
6375
6379
|
type: "single",
|
|
6376
6380
|
autoBackfill: false,
|
|
@@ -6431,7 +6435,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
6431
6435
|
onUpdate,
|
|
6432
6436
|
onDayClick,
|
|
6433
6437
|
onPageChange
|
|
6434
|
-
} = { ...defaultProps$
|
|
6438
|
+
} = { ...defaultProps$13, ...props };
|
|
6435
6439
|
const weekdays = locale.calendaritem.weekdays;
|
|
6436
6440
|
const weeks = [
|
|
6437
6441
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -6981,7 +6985,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
6981
6985
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
6982
6986
|
});
|
|
6983
6987
|
CalendarItem.displayName = "NutCalendarItem";
|
|
6984
|
-
const defaultProps$
|
|
6988
|
+
const defaultProps$12 = {
|
|
6985
6989
|
...ComponentDefaults,
|
|
6986
6990
|
type: "single",
|
|
6987
6991
|
autoBackfill: false,
|
|
@@ -7044,7 +7048,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
7044
7048
|
onConfirm,
|
|
7045
7049
|
onDayClick,
|
|
7046
7050
|
onPageChange
|
|
7047
|
-
} = { ...defaultProps$
|
|
7051
|
+
} = { ...defaultProps$12, ...props };
|
|
7048
7052
|
const calendarRef = useRef(null);
|
|
7049
7053
|
const close2 = () => {
|
|
7050
7054
|
onClose && onClose();
|
|
@@ -7193,7 +7197,7 @@ const getCurrentWeekDays = (day, firstDayOfWeek) => {
|
|
|
7193
7197
|
)
|
|
7194
7198
|
];
|
|
7195
7199
|
};
|
|
7196
|
-
const defaultProps$
|
|
7200
|
+
const defaultProps$11 = {
|
|
7197
7201
|
...ComponentDefaults,
|
|
7198
7202
|
type: "single",
|
|
7199
7203
|
firstDayOfWeek: 0
|
|
@@ -7217,7 +7221,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
7217
7221
|
onDayClick,
|
|
7218
7222
|
onPageChange,
|
|
7219
7223
|
onChange
|
|
7220
|
-
} = { ...defaultProps$
|
|
7224
|
+
} = { ...defaultProps$11, ...props };
|
|
7221
7225
|
const [month, setMonth] = useState(() => {
|
|
7222
7226
|
let date4 = new Date(Date.now());
|
|
7223
7227
|
const val = value || defaultValue;
|
|
@@ -7521,7 +7525,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
7521
7525
|
});
|
|
7522
7526
|
CalendarCard.displayName = "NutCalendarCard";
|
|
7523
7527
|
const CheckboxGroupContext = createContext(null);
|
|
7524
|
-
const defaultProps
|
|
7528
|
+
const defaultProps$10 = {
|
|
7525
7529
|
max: void 0,
|
|
7526
7530
|
min: void 0,
|
|
7527
7531
|
list: false,
|
|
@@ -7551,7 +7555,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
7551
7555
|
onChange,
|
|
7552
7556
|
onLimit,
|
|
7553
7557
|
...rest
|
|
7554
|
-
} = { ...defaultProps
|
|
7558
|
+
} = { ...defaultProps$10, ...props };
|
|
7555
7559
|
useImperativeHandle(ref, () => ({
|
|
7556
7560
|
toggle(state) {
|
|
7557
7561
|
if (state === false) {
|
|
@@ -7644,7 +7648,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
7644
7648
|
}
|
|
7645
7649
|
);
|
|
7646
7650
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
7647
|
-
const defaultProps
|
|
7651
|
+
const defaultProps$$ = {
|
|
7648
7652
|
...ComponentDefaults,
|
|
7649
7653
|
disabled: false,
|
|
7650
7654
|
shape: "round",
|
|
@@ -7658,7 +7662,7 @@ const defaultProps$_ = {
|
|
|
7658
7662
|
const classPrefix$i = "nut-checkbox";
|
|
7659
7663
|
const Checkbox = (props) => {
|
|
7660
7664
|
const { children } = {
|
|
7661
|
-
...defaultProps
|
|
7665
|
+
...defaultProps$$,
|
|
7662
7666
|
...props
|
|
7663
7667
|
};
|
|
7664
7668
|
const {
|
|
@@ -8039,7 +8043,7 @@ function useRefs() {
|
|
|
8039
8043
|
}, []);
|
|
8040
8044
|
return [refs.current, setRefs, reset];
|
|
8041
8045
|
}
|
|
8042
|
-
const defaultProps$
|
|
8046
|
+
const defaultProps$_ = {
|
|
8043
8047
|
...ComponentDefaults,
|
|
8044
8048
|
visible: false,
|
|
8045
8049
|
title: "",
|
|
@@ -8070,7 +8074,7 @@ const InternalPicker = (props, ref) => {
|
|
|
8070
8074
|
afterClose,
|
|
8071
8075
|
onChange,
|
|
8072
8076
|
...rest
|
|
8073
|
-
} = { ...defaultProps$
|
|
8077
|
+
} = { ...defaultProps$_, ...props };
|
|
8074
8078
|
const classPrefix2 = "nut-picker";
|
|
8075
8079
|
const classes = classNames(classPrefix2, className);
|
|
8076
8080
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -8382,7 +8386,7 @@ const padZero = (num, targetLength = 2) => {
|
|
|
8382
8386
|
return str;
|
|
8383
8387
|
};
|
|
8384
8388
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8385
|
-
const defaultProps$
|
|
8389
|
+
const defaultProps$Z = {
|
|
8386
8390
|
...ComponentDefaults,
|
|
8387
8391
|
visible: false,
|
|
8388
8392
|
title: "",
|
|
@@ -8415,7 +8419,7 @@ const DatePicker = (props) => {
|
|
|
8415
8419
|
style,
|
|
8416
8420
|
...rest
|
|
8417
8421
|
} = {
|
|
8418
|
-
...defaultProps$
|
|
8422
|
+
...defaultProps$Z,
|
|
8419
8423
|
...props
|
|
8420
8424
|
};
|
|
8421
8425
|
const { locale } = useConfig$1();
|
|
@@ -9940,7 +9944,7 @@ const useForm = (form) => {
|
|
|
9940
9944
|
}
|
|
9941
9945
|
return [formRef.current];
|
|
9942
9946
|
};
|
|
9943
|
-
const defaultProps$
|
|
9947
|
+
const defaultProps$Y = {
|
|
9944
9948
|
...ComponentDefaults,
|
|
9945
9949
|
labelPosition: "right",
|
|
9946
9950
|
starPosition: "left",
|
|
@@ -9971,7 +9975,7 @@ const Form = React__default.forwardRef(
|
|
|
9971
9975
|
starPosition,
|
|
9972
9976
|
form
|
|
9973
9977
|
} = {
|
|
9974
|
-
...defaultProps$
|
|
9978
|
+
...defaultProps$Y,
|
|
9975
9979
|
...props
|
|
9976
9980
|
};
|
|
9977
9981
|
let formInstance;
|
|
@@ -10027,7 +10031,7 @@ function isForwardRefComponent(component) {
|
|
|
10027
10031
|
}
|
|
10028
10032
|
).$$typeof === component.type.$$typeof;
|
|
10029
10033
|
}
|
|
10030
|
-
const defaultProps$
|
|
10034
|
+
const defaultProps$X = {
|
|
10031
10035
|
...ComponentDefaults,
|
|
10032
10036
|
required: false,
|
|
10033
10037
|
name: "",
|
|
@@ -10121,9 +10125,10 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10121
10125
|
rules: rules2,
|
|
10122
10126
|
className,
|
|
10123
10127
|
style,
|
|
10128
|
+
align,
|
|
10124
10129
|
errorMessageAlign
|
|
10125
10130
|
} = {
|
|
10126
|
-
...defaultProps$
|
|
10131
|
+
...defaultProps$X,
|
|
10127
10132
|
...this.props
|
|
10128
10133
|
};
|
|
10129
10134
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -10136,6 +10141,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10136
10141
|
{
|
|
10137
10142
|
className: `nut-form-item ${className}`,
|
|
10138
10143
|
style,
|
|
10144
|
+
align,
|
|
10139
10145
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
10140
10146
|
},
|
|
10141
10147
|
label ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -10192,7 +10198,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
10192
10198
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
10193
10199
|
}
|
|
10194
10200
|
};
|
|
10195
|
-
_FormItem.defaultProps = defaultProps$
|
|
10201
|
+
_FormItem.defaultProps = defaultProps$X;
|
|
10196
10202
|
_FormItem.contextType = Context;
|
|
10197
10203
|
let FormItem = _FormItem;
|
|
10198
10204
|
const InnerForm = Form;
|
|
@@ -10222,7 +10228,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
10222
10228
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
10223
10229
|
return value.replace(regExp, "");
|
|
10224
10230
|
}
|
|
10225
|
-
const defaultProps$
|
|
10231
|
+
const defaultProps$W = {
|
|
10226
10232
|
...ComponentDefaults,
|
|
10227
10233
|
type: "text",
|
|
10228
10234
|
name: "",
|
|
@@ -10267,7 +10273,7 @@ const Input = forwardRef(
|
|
|
10267
10273
|
value: _value,
|
|
10268
10274
|
...rest
|
|
10269
10275
|
} = {
|
|
10270
|
-
...defaultProps$
|
|
10276
|
+
...defaultProps$W,
|
|
10271
10277
|
...props
|
|
10272
10278
|
};
|
|
10273
10279
|
const [value, setValue] = usePropsValue({
|
|
@@ -10418,7 +10424,7 @@ const Input = forwardRef(
|
|
|
10418
10424
|
}
|
|
10419
10425
|
);
|
|
10420
10426
|
Input.displayName = "NutInput";
|
|
10421
|
-
const defaultProps$
|
|
10427
|
+
const defaultProps$V = {
|
|
10422
10428
|
...ComponentDefaults,
|
|
10423
10429
|
disabled: false,
|
|
10424
10430
|
readOnly: false,
|
|
@@ -10456,7 +10462,7 @@ const InputNumber = (props) => {
|
|
|
10456
10462
|
onChange,
|
|
10457
10463
|
...restProps
|
|
10458
10464
|
} = {
|
|
10459
|
-
...defaultProps$
|
|
10465
|
+
...defaultProps$V,
|
|
10460
10466
|
...props
|
|
10461
10467
|
};
|
|
10462
10468
|
const classes = classNames(classPrefix$h, className, {
|
|
@@ -10547,6 +10553,17 @@ const InputNumber = (props) => {
|
|
|
10547
10553
|
if (text === "-") return null;
|
|
10548
10554
|
return text;
|
|
10549
10555
|
};
|
|
10556
|
+
const clampValue = (valueStr) => {
|
|
10557
|
+
if (valueStr === null) return defaultValue;
|
|
10558
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
10559
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
10560
|
+
};
|
|
10561
|
+
const handleValueChange = (valueStr, e2) => {
|
|
10562
|
+
const val = clampValue(valueStr);
|
|
10563
|
+
if (val !== Number(shadowValue)) {
|
|
10564
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
10565
|
+
}
|
|
10566
|
+
};
|
|
10550
10567
|
const handleInputChange = (e2) => {
|
|
10551
10568
|
setInputValue(e2.target.value);
|
|
10552
10569
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -10557,26 +10574,31 @@ const InputNumber = (props) => {
|
|
|
10557
10574
|
setShadowValue(defaultValue);
|
|
10558
10575
|
}
|
|
10559
10576
|
} else {
|
|
10560
|
-
setShadowValue(valueStr);
|
|
10561
|
-
}
|
|
10562
|
-
if (!async) {
|
|
10563
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10577
|
+
setShadowValue(clampValue(valueStr));
|
|
10564
10578
|
}
|
|
10579
|
+
!async && handleValueChange(valueStr, e2);
|
|
10565
10580
|
};
|
|
10566
10581
|
const handleFocus = (e2) => {
|
|
10567
10582
|
setFocused(true);
|
|
10568
10583
|
setInputValue(
|
|
10569
10584
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
10570
10585
|
);
|
|
10571
|
-
onFocus
|
|
10586
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
10572
10587
|
};
|
|
10573
10588
|
const handleBlur = (e2) => {
|
|
10574
10589
|
setFocused(false);
|
|
10575
|
-
onBlur
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10590
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
10591
|
+
const valueStr = parseValue(e2.target.value);
|
|
10592
|
+
if (valueStr === null) {
|
|
10593
|
+
if (allowEmpty) {
|
|
10594
|
+
setShadowValue(null);
|
|
10595
|
+
} else {
|
|
10596
|
+
setShadowValue(defaultValue);
|
|
10597
|
+
}
|
|
10598
|
+
} else {
|
|
10599
|
+
setShadowValue(clampValue(valueStr));
|
|
10579
10600
|
}
|
|
10601
|
+
async && handleValueChange(valueStr, e2);
|
|
10580
10602
|
};
|
|
10581
10603
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React__default.createElement(
|
|
10582
10604
|
a$1,
|
|
@@ -10609,8 +10631,9 @@ const InputNumber = (props) => {
|
|
|
10609
10631
|
)));
|
|
10610
10632
|
};
|
|
10611
10633
|
InputNumber.displayName = "NutInputNumber";
|
|
10612
|
-
const defaultProps$
|
|
10634
|
+
const defaultProps$U = {
|
|
10613
10635
|
...ComponentDefaults,
|
|
10636
|
+
titleIcon: null,
|
|
10614
10637
|
columns: 1,
|
|
10615
10638
|
direction: "down",
|
|
10616
10639
|
icon: null,
|
|
@@ -10640,7 +10663,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10640
10663
|
parent,
|
|
10641
10664
|
index
|
|
10642
10665
|
} = {
|
|
10643
|
-
...defaultProps$
|
|
10666
|
+
...defaultProps$U,
|
|
10644
10667
|
...props
|
|
10645
10668
|
};
|
|
10646
10669
|
const [showPopup, setShowPopup] = useState(show2);
|
|
@@ -10821,7 +10844,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10821
10844
|
));
|
|
10822
10845
|
});
|
|
10823
10846
|
MenuItem.displayName = "NutMenuItem";
|
|
10824
|
-
const defaultProps$
|
|
10847
|
+
const defaultProps$T = {
|
|
10825
10848
|
...ComponentDefaults,
|
|
10826
10849
|
activeColor: "",
|
|
10827
10850
|
closeOnOverlayClick: true,
|
|
@@ -10848,7 +10871,7 @@ const Menu = (props) => {
|
|
|
10848
10871
|
onOpen,
|
|
10849
10872
|
...rest
|
|
10850
10873
|
} = {
|
|
10851
|
-
...defaultProps$
|
|
10874
|
+
...defaultProps$T,
|
|
10852
10875
|
...props
|
|
10853
10876
|
};
|
|
10854
10877
|
const menuRef = useRef(null);
|
|
@@ -10913,7 +10936,15 @@ const Menu = (props) => {
|
|
|
10913
10936
|
const menuTitle = () => {
|
|
10914
10937
|
return React__default.Children.map(children, (child, index) => {
|
|
10915
10938
|
if (React__default.isValidElement(child)) {
|
|
10916
|
-
const {
|
|
10939
|
+
const {
|
|
10940
|
+
title,
|
|
10941
|
+
titleIcon,
|
|
10942
|
+
options,
|
|
10943
|
+
value,
|
|
10944
|
+
defaultValue,
|
|
10945
|
+
disabled,
|
|
10946
|
+
direction
|
|
10947
|
+
} = child.props;
|
|
10917
10948
|
const selected = options == null ? void 0 : options.filter(
|
|
10918
10949
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
10919
10950
|
);
|
|
@@ -10924,6 +10955,25 @@ const Menu = (props) => {
|
|
|
10924
10955
|
return selected[0].text;
|
|
10925
10956
|
return "";
|
|
10926
10957
|
};
|
|
10958
|
+
const finallyIcon = () => {
|
|
10959
|
+
if (titleIcon) return titleIcon;
|
|
10960
|
+
if (icon) return icon;
|
|
10961
|
+
return direction === "up" ? /* @__PURE__ */ React__default.createElement(
|
|
10962
|
+
a$2,
|
|
10963
|
+
{
|
|
10964
|
+
className: "nut-menu-title-icon",
|
|
10965
|
+
width: "12px",
|
|
10966
|
+
height: "12px"
|
|
10967
|
+
}
|
|
10968
|
+
) : /* @__PURE__ */ React__default.createElement(
|
|
10969
|
+
g$6,
|
|
10970
|
+
{
|
|
10971
|
+
className: "nut-menu-title-icon",
|
|
10972
|
+
width: "12px",
|
|
10973
|
+
height: "12px"
|
|
10974
|
+
}
|
|
10975
|
+
);
|
|
10976
|
+
};
|
|
10927
10977
|
return /* @__PURE__ */ React__default.createElement(
|
|
10928
10978
|
"div",
|
|
10929
10979
|
{
|
|
@@ -10939,7 +10989,7 @@ const Menu = (props) => {
|
|
|
10939
10989
|
}
|
|
10940
10990
|
},
|
|
10941
10991
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
10942
|
-
|
|
10992
|
+
finallyIcon()
|
|
10943
10993
|
);
|
|
10944
10994
|
}
|
|
10945
10995
|
return null;
|
|
@@ -10968,6 +11018,16 @@ const Menu = (props) => {
|
|
|
10968
11018
|
};
|
|
10969
11019
|
Menu.displayName = "NutMenu";
|
|
10970
11020
|
Menu.Item = MenuItem;
|
|
11021
|
+
const defaultProps$S = {
|
|
11022
|
+
...ComponentDefaults,
|
|
11023
|
+
visible: false,
|
|
11024
|
+
rightActions: "",
|
|
11025
|
+
type: "default",
|
|
11026
|
+
custom: [],
|
|
11027
|
+
random: false,
|
|
11028
|
+
onClose: () => {
|
|
11029
|
+
}
|
|
11030
|
+
};
|
|
10971
11031
|
const NumberKeyboard = (props) => {
|
|
10972
11032
|
const { locale } = useConfig$1();
|
|
10973
11033
|
const {
|
|
@@ -10985,7 +11045,7 @@ const NumberKeyboard = (props) => {
|
|
|
10985
11045
|
onClose,
|
|
10986
11046
|
onConfirm,
|
|
10987
11047
|
...rest
|
|
10988
|
-
} = props;
|
|
11048
|
+
} = { ...defaultProps$S, ...props };
|
|
10989
11049
|
const classPrefix2 = "nut-numberkeyboard";
|
|
10990
11050
|
const getBasicKeys = () => {
|
|
10991
11051
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -11031,17 +11091,35 @@ const NumberKeyboard = (props) => {
|
|
|
11031
11091
|
};
|
|
11032
11092
|
const onTouchEnd = (item2) => {
|
|
11033
11093
|
setActive(false);
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11094
|
+
switch (item2.type) {
|
|
11095
|
+
case "num":
|
|
11096
|
+
case "custom":
|
|
11097
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
11098
|
+
break;
|
|
11099
|
+
case "close":
|
|
11100
|
+
onClose == null ? void 0 : onClose();
|
|
11101
|
+
break;
|
|
11102
|
+
case "delete":
|
|
11103
|
+
onDelete == null ? void 0 : onDelete();
|
|
11104
|
+
break;
|
|
11105
|
+
case "confirm":
|
|
11106
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
11107
|
+
break;
|
|
11042
11108
|
}
|
|
11043
|
-
|
|
11044
|
-
|
|
11109
|
+
};
|
|
11110
|
+
const renderContent = (item2) => {
|
|
11111
|
+
switch (item2.type) {
|
|
11112
|
+
case "num":
|
|
11113
|
+
case "custom":
|
|
11114
|
+
return /* @__PURE__ */ React__default.createElement("div", null, item2.id);
|
|
11115
|
+
case "delete":
|
|
11116
|
+
return /* @__PURE__ */ React__default.createElement(DeleteIcon, null);
|
|
11117
|
+
case "close":
|
|
11118
|
+
return /* @__PURE__ */ React__default.createElement(g$6, { size: 18 });
|
|
11119
|
+
case "confirm":
|
|
11120
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done);
|
|
11121
|
+
default:
|
|
11122
|
+
return null;
|
|
11045
11123
|
}
|
|
11046
11124
|
};
|
|
11047
11125
|
return /* @__PURE__ */ React__default.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React__default.createElement(
|
|
@@ -11058,22 +11136,19 @@ const NumberKeyboard = (props) => {
|
|
|
11058
11136
|
onTouchEnd: () => onTouchEnd(item),
|
|
11059
11137
|
onTouchCancel: () => onTouchEnd(item)
|
|
11060
11138
|
},
|
|
11061
|
-
(item
|
|
11062
|
-
item.type === "delete" && /* @__PURE__ */ React__default.createElement(DeleteIcon, null),
|
|
11063
|
-
item.type === "close" && /* @__PURE__ */ React__default.createElement(g$6, { size: 18 }),
|
|
11064
|
-
item.type === "confirm" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done)
|
|
11139
|
+
renderContent(item)
|
|
11065
11140
|
));
|
|
11066
11141
|
};
|
|
11067
11142
|
return /* @__PURE__ */ React__default.createElement(
|
|
11068
11143
|
Popup,
|
|
11069
11144
|
{
|
|
11145
|
+
...rest,
|
|
11070
11146
|
visible,
|
|
11071
11147
|
position: "bottom",
|
|
11072
11148
|
onOverlayClick: onClose,
|
|
11073
11149
|
onCloseIconClick: onClose,
|
|
11074
11150
|
zIndex: 9999,
|
|
11075
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11076
|
-
...rest
|
|
11151
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
11077
11152
|
},
|
|
11078
11153
|
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header-title` }, title), type4 === "default" && /* @__PURE__ */ React__default.createElement(
|
|
11079
11154
|
"span",
|
|
@@ -12460,10 +12535,12 @@ class UploaderTaro extends Upload {
|
|
|
12460
12535
|
uploadTaro(uploadFile2, env) {
|
|
12461
12536
|
var _a;
|
|
12462
12537
|
const options = this.options;
|
|
12538
|
+
if (options.beforeXhrUpload) {
|
|
12539
|
+
options.beforeXhrUpload(uploadFile2, options);
|
|
12540
|
+
return;
|
|
12541
|
+
}
|
|
12463
12542
|
if (env === "WEB") {
|
|
12464
12543
|
this.upload();
|
|
12465
|
-
} else if (options.beforeXhrUpload) {
|
|
12466
|
-
options.beforeXhrUpload(uploadFile2, options);
|
|
12467
12544
|
} else {
|
|
12468
12545
|
const uploadTask = uploadFile2({
|
|
12469
12546
|
url: options.url,
|
|
@@ -12920,7 +12997,7 @@ const InternalUploader = (props, ref) => {
|
|
|
12920
12997
|
/** 拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 30s 之间 */
|
|
12921
12998
|
maxDuration,
|
|
12922
12999
|
/** 仅对 mediaType 为 image 时有效,是否压缩所选文件 */
|
|
12923
|
-
sizeType
|
|
13000
|
+
sizeType,
|
|
12924
13001
|
/** 仅在 sourceType 为 camera 时生效,使用前置或后置摄像头 */
|
|
12925
13002
|
camera,
|
|
12926
13003
|
/** 接口调用失败的回调函数 */
|
|
@@ -14751,10 +14828,11 @@ const PullToRefresh = (p) => {
|
|
|
14751
14828
|
return "";
|
|
14752
14829
|
};
|
|
14753
14830
|
const handleTouchStart = (e2) => {
|
|
14831
|
+
if (props.disabled) return;
|
|
14754
14832
|
touch.start(e2);
|
|
14755
14833
|
};
|
|
14756
14834
|
const handleTouchMove = (e2) => {
|
|
14757
|
-
if (props.scrollTop > 0) {
|
|
14835
|
+
if (props.scrollTop > 0 || props.disabled) {
|
|
14758
14836
|
return;
|
|
14759
14837
|
}
|
|
14760
14838
|
if (status === "refreshing" || status === "complete") return;
|
|
@@ -14794,6 +14872,7 @@ const PullToRefresh = (p) => {
|
|
|
14794
14872
|
setStatus("pulling");
|
|
14795
14873
|
}
|
|
14796
14874
|
const handleTouchEnd = () => {
|
|
14875
|
+
if (props.disabled) return;
|
|
14797
14876
|
pullingRef.current = false;
|
|
14798
14877
|
if (status === "canRelease") {
|
|
14799
14878
|
doRefresh();
|
|
@@ -17015,27 +17094,37 @@ const ImagePreview = (props) => {
|
|
|
17015
17094
|
defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
|
|
17016
17095
|
indicator
|
|
17017
17096
|
},
|
|
17018
|
-
(videos
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
|
|
17022
|
-
|
|
17023
|
-
|
|
17024
|
-
|
|
17025
|
-
|
|
17026
|
-
|
|
17097
|
+
(videos ?? []).map(
|
|
17098
|
+
(item) => ({ type: "video", data: item })
|
|
17099
|
+
).concat(
|
|
17100
|
+
(images ?? []).map((item) => ({ type: "image", data: item }))
|
|
17101
|
+
).sort((a2, b) => {
|
|
17102
|
+
var _a, _b;
|
|
17103
|
+
return (((_a = a2.data) == null ? void 0 : _a.index) ?? 0) - (((_b = b.data) == null ? void 0 : _b.index) ?? 0);
|
|
17104
|
+
}).map((item, index) => {
|
|
17105
|
+
if (item.type === "video") {
|
|
17106
|
+
const { source, options } = item.data;
|
|
17107
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
17108
|
+
SwiperItem,
|
|
17027
17109
|
{
|
|
17028
|
-
|
|
17029
|
-
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
17038
|
-
|
|
17110
|
+
key: index,
|
|
17111
|
+
className: "nut-imagepreview-swiper-item"
|
|
17112
|
+
},
|
|
17113
|
+
/* @__PURE__ */ React__default.createElement(
|
|
17114
|
+
Video$1,
|
|
17115
|
+
{
|
|
17116
|
+
src: source.src,
|
|
17117
|
+
onClick: closeOnImg,
|
|
17118
|
+
controls: options.controls,
|
|
17119
|
+
autoplay: false,
|
|
17120
|
+
loop: false,
|
|
17121
|
+
muted: options.muted
|
|
17122
|
+
}
|
|
17123
|
+
)
|
|
17124
|
+
);
|
|
17125
|
+
}
|
|
17126
|
+
if (item.type === "image") {
|
|
17127
|
+
const { src } = item.data;
|
|
17039
17128
|
return /* @__PURE__ */ React__default.createElement(
|
|
17040
17129
|
SwiperItem,
|
|
17041
17130
|
{
|
|
@@ -17046,7 +17135,7 @@ const ImagePreview = (props) => {
|
|
|
17046
17135
|
/* @__PURE__ */ React__default.createElement(
|
|
17047
17136
|
Image$2,
|
|
17048
17137
|
{
|
|
17049
|
-
src
|
|
17138
|
+
src,
|
|
17050
17139
|
mode: "widthFix",
|
|
17051
17140
|
onClick: closeOnImg,
|
|
17052
17141
|
style: { width: "100%" },
|
|
@@ -17057,8 +17146,9 @@ const ImagePreview = (props) => {
|
|
|
17057
17146
|
),
|
|
17058
17147
|
")"
|
|
17059
17148
|
);
|
|
17060
|
-
}
|
|
17061
|
-
|
|
17149
|
+
}
|
|
17150
|
+
return null;
|
|
17151
|
+
})
|
|
17062
17152
|
)
|
|
17063
17153
|
),
|
|
17064
17154
|
pagination ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)) : null,
|