@nutui/nutui-react 1.2.3-beta.0 → 1.2.3-beta.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/dist/esm/Address.js +76 -28
- package/dist/esm/Badge.js +4 -4
- package/dist/esm/Col.js +6 -2
- package/dist/esm/Collapse.js +1 -0
- package/dist/esm/CollapseItem.js +2 -2
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/Picker.js +4 -4
- package/dist/esm/Popover.js +19 -35
- package/dist/esm/Popup.js +54 -30
- package/dist/esm/Row.js +9 -3
- package/dist/esm/SideNavBar/style/index.js +2 -0
- package/dist/esm/SideNavBar.js +65 -0
- package/dist/esm/SideNavBarItem/style/index.js +2 -0
- package/dist/esm/SideNavBarItem.js +32 -0
- package/dist/esm/SubSideNavBar/style/index.js +2 -0
- package/dist/esm/SubSideNavBar.js +94 -0
- package/dist/esm/Swiper.js +36 -11
- package/dist/esm/SwiperItem.js +1 -15
- package/dist/esm/Table/style/index.js +2 -0
- package/dist/esm/Table.js +154 -0
- package/dist/esm/nutui-react.es.js +4 -0
- package/dist/esm/offsetContext-0e3d04b3.js +19 -0
- 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/nutui.react.es.js +648 -313
- package/dist/nutui.react.umd.js +15 -15
- package/dist/packages/address/address.scss +9 -2
- package/dist/packages/sidenavbar/sidenavbar.scss +69 -0
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +8 -0
- package/dist/packages/subsidenavbar/subsidenavbar.scss +23 -0
- package/dist/packages/swiper/swiper.scss +3 -0
- package/dist/packages/table/table.scss +81 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +4 -0
- package/dist/styles/variables.scss +12 -3
- package/dist/types/actionsheet/demo.d.ts +0 -1
- package/dist/types/address/__test__/address.spec.d.ts +1 -0
- package/dist/types/address/address.d.ts +4 -27
- package/dist/types/address/customRender.d.ts +3 -7
- package/dist/types/address/demo.d.ts +0 -1
- package/dist/types/address/existRender.d.ts +1 -1
- package/dist/types/address/type.d.ts +40 -0
- package/dist/types/animatingnumbers/demo.d.ts +0 -1
- package/dist/types/avatar/demo.d.ts +0 -1
- package/dist/types/backtop/demo.d.ts +0 -1
- package/dist/types/badge/badge.d.ts +2 -1
- package/dist/types/badge/demo.d.ts +0 -1
- package/dist/types/barrage/demo.d.ts +0 -1
- package/dist/types/button/demo.d.ts +0 -1
- package/dist/types/calendar/demo.d.ts +0 -1
- package/dist/types/card/card.d.ts +4 -4
- package/dist/types/card/demo.d.ts +0 -1
- package/dist/types/cell/demo.d.ts +0 -1
- package/dist/types/cellgroup/cellgroup.d.ts +1 -0
- package/dist/types/checkbox/demo.d.ts +0 -1
- package/dist/types/circleprogress/demo.d.ts +0 -1
- package/dist/types/col/col.d.ts +4 -1
- package/dist/types/collapse/collapse.d.ts +2 -1
- package/dist/types/collapse/demo.d.ts +0 -1
- package/dist/types/configprovider/demo.d.ts +0 -1
- package/dist/types/countdown/demo.d.ts +0 -1
- package/dist/types/datepicker/demo.d.ts +0 -1
- package/dist/types/dialog/Mask.d.ts +0 -1
- package/dist/types/dialog/demo.d.ts +0 -1
- package/dist/types/divider/demo.d.ts +0 -1
- package/dist/types/drag/demo.d.ts +0 -1
- package/dist/types/elevator/demo.d.ts +0 -1
- package/dist/types/empty/demo.d.ts +0 -1
- package/dist/types/fixednav/demo.d.ts +0 -1
- package/dist/types/fixednav/fixednav.d.ts +5 -5
- package/dist/types/icon/demo.d.ts +0 -1
- package/dist/types/indicator/demo.d.ts +0 -1
- package/dist/types/infiniteloading/demo.d.ts +0 -1
- package/dist/types/input/demo.d.ts +0 -1
- package/dist/types/input/input.d.ts +3 -3
- package/dist/types/inputnumber/demo.d.ts +0 -1
- package/dist/types/layout/__tests__/layout.spec.d.ts +1 -0
- package/dist/types/layout/demo.d.ts +0 -1
- package/dist/types/navbar/demo.d.ts +0 -1
- package/dist/types/navbar/navbar.d.ts +1 -0
- package/dist/types/noticebar/demo.d.ts +0 -1
- package/dist/types/notify/demo.d.ts +0 -1
- package/dist/types/numberkeyboard/demo.d.ts +0 -1
- package/dist/types/nutui.react.d.ts +5 -1
- package/dist/types/overlay/demo.d.ts +0 -1
- package/dist/types/pagination/demo.d.ts +0 -1
- package/dist/types/picker/__tests__/picker.spec.d.ts +1 -0
- package/dist/types/picker/demo.d.ts +0 -1
- package/dist/types/popover/Trigger.d.ts +2 -4
- package/dist/types/popover/demo.d.ts +0 -1
- package/dist/types/popover/popover.d.ts +1 -0
- package/dist/types/popup/__tests__/popup.spec.d.ts +1 -0
- package/dist/types/popup/demo.d.ts +0 -1
- package/dist/types/popup/popup.d.ts +2 -0
- package/dist/types/price/demo.d.ts +0 -1
- package/dist/types/progress/demo.d.ts +0 -1
- package/dist/types/radio/demo.d.ts +0 -1
- package/dist/types/range/demo.d.ts +0 -1
- package/dist/types/rate/demo.d.ts +0 -1
- package/dist/types/row/row.d.ts +4 -1
- package/dist/types/searchbar/demo.d.ts +0 -1
- package/dist/types/shortpassword/demo.d.ts +0 -1
- package/dist/types/sidenavbar/__test__/sidenavbar.spec.d.ts +1 -0
- package/dist/types/sidenavbar/demo.d.ts +2 -0
- package/dist/types/sidenavbar/index.d.ts +2 -0
- package/dist/types/sidenavbar/offsetContext.d.ts +2 -0
- package/dist/types/sidenavbar/sidenavbar.d.ts +3 -0
- package/dist/types/sidenavbar/type.d.ts +34 -0
- package/dist/types/sidenavbar/utils.d.ts +3 -0
- package/dist/types/sidenavbaritem/__test__/sidenavbaritem.spec.d.ts +1 -0
- package/dist/types/sidenavbaritem/index.d.ts +2 -0
- package/dist/types/sidenavbaritem/sidenavbaritem.d.ts +3 -0
- package/dist/types/signature/demo.d.ts +0 -1
- package/dist/types/skeleton/demo.d.ts +0 -1
- package/dist/types/skeleton/skeleton.d.ts +1 -0
- package/dist/types/steps/demo.d.ts +0 -1
- package/dist/types/subsidenavbar/__test__/subsidenavbar.spec.d.ts +1 -0
- package/dist/types/subsidenavbar/index.d.ts +2 -0
- package/dist/types/subsidenavbar/subsidenavbar.d.ts +3 -0
- package/dist/types/swiper/__tests__/swiper.spec.d.ts +1 -0
- package/dist/types/swiper/demo.d.ts +0 -1
- package/dist/types/swiper/swiper.d.ts +1 -0
- package/dist/types/switch/demo.d.ts +0 -1
- package/dist/types/tabbar/demo.d.ts +0 -1
- package/dist/types/tabbar/tabbar.d.ts +1 -0
- package/dist/types/table/__test__/table.spec.d.ts +1 -0
- package/dist/types/table/demo.d.ts +2 -0
- package/dist/types/table/index.d.ts +2 -0
- package/dist/types/table/table.d.ts +3 -0
- package/dist/types/table/types.d.ts +19 -0
- package/dist/types/tabpane/tabpane.d.ts +2 -1
- package/dist/types/tabs/demo.d.ts +0 -1
- package/dist/types/tabs/tabs.d.ts +1 -0
- package/dist/types/tag/demo.d.ts +0 -1
- package/dist/types/tag/tag.d.ts +2 -1
- package/dist/types/textarea/demo.d.ts +0 -1
- package/dist/types/timedetail/demo.d.ts +0 -1
- package/dist/types/timepannel/demo.d.ts +0 -1
- package/dist/types/timeselect/demo.d.ts +0 -1
- package/dist/types/toast/demo.d.ts +0 -1
- package/dist/types/uploader/demo.d.ts +0 -1
- package/dist/types/video/demo.d.ts +0 -1
- package/dist/types/virtuallist/demo.d.ts +0 -1
- package/package.json +3 -3
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.2.2
|
|
2
|
+
* @nutui/nutui-react v1.2.2 Fri Aug 12 2022 15:37:41 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import React__default, { useCallback, useState, useEffect, Component, useRef, createContext, useContext as useContext$1, useImperativeHandle, useLayoutEffect as useLayoutEffect$1, forwardRef, useMemo, memo } from "react";
|
|
8
8
|
import * as ReactDOM from "react-dom";
|
|
9
|
-
import ReactDOM__default, { unstable_batchedUpdates } from "react-dom";
|
|
9
|
+
import ReactDOM__default, { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
10
10
|
var classname = { exports: {} };
|
|
11
11
|
var classname_production_min = {};
|
|
12
12
|
function r$1(r2) {
|
|
@@ -45,7 +45,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
|
|
|
45
45
|
classname.exports = classname_production_min;
|
|
46
46
|
}
|
|
47
47
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
48
|
-
const defaultProps$
|
|
48
|
+
const defaultProps$1a = {
|
|
49
49
|
name: "",
|
|
50
50
|
size: "",
|
|
51
51
|
classPrefix: "nutui-icon",
|
|
@@ -73,13 +73,13 @@ const Icon = (props) => {
|
|
|
73
73
|
click,
|
|
74
74
|
...rest
|
|
75
75
|
} = {
|
|
76
|
-
...defaultProps$
|
|
76
|
+
...defaultProps$1a,
|
|
77
77
|
...props
|
|
78
78
|
};
|
|
79
79
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
80
80
|
const type = isImage ? "img" : tag;
|
|
81
81
|
const b2 = cn("icon");
|
|
82
|
-
const
|
|
82
|
+
const handleClick2 = (e2) => {
|
|
83
83
|
if (props.click) {
|
|
84
84
|
props.click(e2);
|
|
85
85
|
}
|
|
@@ -101,13 +101,13 @@ const Icon = (props) => {
|
|
|
101
101
|
...style
|
|
102
102
|
},
|
|
103
103
|
...rest,
|
|
104
|
-
onClick:
|
|
104
|
+
onClick: handleClick2,
|
|
105
105
|
...hasSrc()
|
|
106
106
|
}, children);
|
|
107
107
|
};
|
|
108
|
-
Icon.defaultProps = defaultProps$
|
|
108
|
+
Icon.defaultProps = defaultProps$1a;
|
|
109
109
|
Icon.displayName = "NutIcon";
|
|
110
|
-
const defaultProps$
|
|
110
|
+
const defaultProps$19 = {
|
|
111
111
|
className: "",
|
|
112
112
|
color: "",
|
|
113
113
|
shape: "round",
|
|
@@ -140,7 +140,7 @@ const Button = (props) => {
|
|
|
140
140
|
style,
|
|
141
141
|
...rest
|
|
142
142
|
} = {
|
|
143
|
-
...defaultProps$
|
|
143
|
+
...defaultProps$19,
|
|
144
144
|
...props
|
|
145
145
|
};
|
|
146
146
|
const getStyle = useCallback(() => {
|
|
@@ -194,7 +194,7 @@ const Button = (props) => {
|
|
|
194
194
|
classes,
|
|
195
195
|
getStyle
|
|
196
196
|
]);
|
|
197
|
-
const
|
|
197
|
+
const handleClick2 = (e2) => {
|
|
198
198
|
if (!loading && !disabled && onClick) {
|
|
199
199
|
onClick(e2);
|
|
200
200
|
}
|
|
@@ -203,7 +203,7 @@ const Button = (props) => {
|
|
|
203
203
|
className: `${btnName} ${className}`,
|
|
204
204
|
style: { ...btnStyle, ...style },
|
|
205
205
|
...rest,
|
|
206
|
-
onClick: (e2) =>
|
|
206
|
+
onClick: (e2) => handleClick2(e2)
|
|
207
207
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
208
208
|
className: "nut-button__warp",
|
|
209
209
|
style: getStyle()
|
|
@@ -213,7 +213,7 @@ const Button = (props) => {
|
|
|
213
213
|
name: icon
|
|
214
214
|
}) : "", children));
|
|
215
215
|
};
|
|
216
|
-
Button.defaultProps = defaultProps$
|
|
216
|
+
Button.defaultProps = defaultProps$19;
|
|
217
217
|
Button.displayName = "NutButton";
|
|
218
218
|
function _setPrototypeOf(o, p2) {
|
|
219
219
|
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
|
|
@@ -1429,7 +1429,7 @@ var useContext = React__default.useContext;
|
|
|
1429
1429
|
function useHistory() {
|
|
1430
1430
|
return useContext(historyContext);
|
|
1431
1431
|
}
|
|
1432
|
-
const defaultProps$
|
|
1432
|
+
const defaultProps$18 = {
|
|
1433
1433
|
title: null,
|
|
1434
1434
|
subTitle: null,
|
|
1435
1435
|
desc: "",
|
|
@@ -1469,12 +1469,12 @@ const Cell = (props) => {
|
|
|
1469
1469
|
linkSlot,
|
|
1470
1470
|
...rest
|
|
1471
1471
|
} = {
|
|
1472
|
-
...defaultProps$
|
|
1472
|
+
...defaultProps$18,
|
|
1473
1473
|
...props
|
|
1474
1474
|
};
|
|
1475
1475
|
const b2 = cn("cell");
|
|
1476
1476
|
const history = useHistory();
|
|
1477
|
-
const
|
|
1477
|
+
const handleClick2 = (event) => {
|
|
1478
1478
|
click(event);
|
|
1479
1479
|
if (to2 && history) {
|
|
1480
1480
|
history[replace ? "replace" : "push"](to2);
|
|
@@ -1491,7 +1491,7 @@ const Cell = (props) => {
|
|
|
1491
1491
|
};
|
|
1492
1492
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1493
1493
|
className: `${b2({ clickable: !!(isLink || to2), center, large: size === "large" }, [className])} `,
|
|
1494
|
-
onClick: (event) =>
|
|
1494
|
+
onClick: (event) => handleClick2(event),
|
|
1495
1495
|
style: baseStyle,
|
|
1496
1496
|
...rest
|
|
1497
1497
|
}, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -1515,9 +1515,9 @@ const Cell = (props) => {
|
|
|
1515
1515
|
className: b2("link")
|
|
1516
1516
|
}) : linkSlot));
|
|
1517
1517
|
};
|
|
1518
|
-
Cell.defaultProps = defaultProps$
|
|
1518
|
+
Cell.defaultProps = defaultProps$18;
|
|
1519
1519
|
Cell.displayName = "NutCell";
|
|
1520
|
-
const defaultProps$
|
|
1520
|
+
const defaultProps$17 = {
|
|
1521
1521
|
title: "",
|
|
1522
1522
|
desc: "",
|
|
1523
1523
|
titleSlot: null,
|
|
@@ -1526,7 +1526,7 @@ const defaultProps$14 = {
|
|
|
1526
1526
|
};
|
|
1527
1527
|
const CellGroup = (props) => {
|
|
1528
1528
|
const { children, classPrefix, title, desc, titleSlot, descSlot } = {
|
|
1529
|
-
...defaultProps$
|
|
1529
|
+
...defaultProps$17,
|
|
1530
1530
|
...props
|
|
1531
1531
|
};
|
|
1532
1532
|
const b2 = cn("cell-group");
|
|
@@ -1540,7 +1540,7 @@ const CellGroup = (props) => {
|
|
|
1540
1540
|
className: b2("wrap")
|
|
1541
1541
|
}, children));
|
|
1542
1542
|
};
|
|
1543
|
-
CellGroup.defaultProps = defaultProps$
|
|
1543
|
+
CellGroup.defaultProps = defaultProps$17;
|
|
1544
1544
|
CellGroup.displayName = "NutCellGroup";
|
|
1545
1545
|
var classnames = { exports: {} };
|
|
1546
1546
|
/*!
|
|
@@ -1646,7 +1646,7 @@ const Overlay = (props) => {
|
|
|
1646
1646
|
document.body.classList.remove("nut-overflow-hidden");
|
|
1647
1647
|
}
|
|
1648
1648
|
};
|
|
1649
|
-
const
|
|
1649
|
+
const handleClick2 = (e2) => {
|
|
1650
1650
|
if (closeOnClickOverlay) {
|
|
1651
1651
|
props.onClick && props.onClick(e2);
|
|
1652
1652
|
renderRef.current = false;
|
|
@@ -1660,7 +1660,7 @@ const Overlay = (props) => {
|
|
|
1660
1660
|
className: classes,
|
|
1661
1661
|
style: styles,
|
|
1662
1662
|
...rest,
|
|
1663
|
-
onClick:
|
|
1663
|
+
onClick: handleClick2
|
|
1664
1664
|
}, children));
|
|
1665
1665
|
};
|
|
1666
1666
|
Overlay.defaultProps = defaultOverlayProps;
|
|
@@ -2080,7 +2080,7 @@ CSSTransition.defaultProps = {
|
|
|
2080
2080
|
};
|
|
2081
2081
|
CSSTransition.propTypes = {};
|
|
2082
2082
|
var CSSTransition$1 = CSSTransition;
|
|
2083
|
-
const defaultProps$
|
|
2083
|
+
const defaultProps$16 = {
|
|
2084
2084
|
position: "center",
|
|
2085
2085
|
transition: "",
|
|
2086
2086
|
style: {},
|
|
@@ -2089,6 +2089,7 @@ const defaultProps$13 = {
|
|
|
2089
2089
|
closeIconPosition: "top-right",
|
|
2090
2090
|
closeIcon: "close",
|
|
2091
2091
|
destroyOnClose: true,
|
|
2092
|
+
teleport: null,
|
|
2092
2093
|
overlay: true,
|
|
2093
2094
|
round: false,
|
|
2094
2095
|
onOpen: () => {
|
|
@@ -2112,8 +2113,10 @@ const Popup = (props) => {
|
|
|
2112
2113
|
const {
|
|
2113
2114
|
children,
|
|
2114
2115
|
visible,
|
|
2116
|
+
overlay,
|
|
2115
2117
|
closeOnClickOverlay,
|
|
2116
2118
|
overlayStyle,
|
|
2119
|
+
overlayClass,
|
|
2117
2120
|
zIndex,
|
|
2118
2121
|
lockScroll,
|
|
2119
2122
|
duration,
|
|
@@ -2127,6 +2130,7 @@ const Popup = (props) => {
|
|
|
2127
2130
|
popClass,
|
|
2128
2131
|
className,
|
|
2129
2132
|
destroyOnClose,
|
|
2133
|
+
teleport,
|
|
2130
2134
|
onOpen,
|
|
2131
2135
|
onClose,
|
|
2132
2136
|
onClickOverlay,
|
|
@@ -2202,6 +2206,49 @@ const Popup = (props) => {
|
|
|
2202
2206
|
const onHandleClosed = (e2) => {
|
|
2203
2207
|
onClosed && onClosed(e2);
|
|
2204
2208
|
};
|
|
2209
|
+
const resolveContainer = (getContainer) => {
|
|
2210
|
+
const container = typeof getContainer === "function" ? getContainer() : getContainer;
|
|
2211
|
+
return container || document.body;
|
|
2212
|
+
};
|
|
2213
|
+
const renderToContainer = (getContainer, node) => {
|
|
2214
|
+
if (getContainer) {
|
|
2215
|
+
const container = resolveContainer(getContainer);
|
|
2216
|
+
return createPortal(node, container);
|
|
2217
|
+
}
|
|
2218
|
+
return node;
|
|
2219
|
+
};
|
|
2220
|
+
const renderPop = () => {
|
|
2221
|
+
return /* @__PURE__ */ React__default.createElement(CSSTransition$1, {
|
|
2222
|
+
classNames: transitionName,
|
|
2223
|
+
unmountOnExit: true,
|
|
2224
|
+
timeout: 500,
|
|
2225
|
+
in: innerVisible,
|
|
2226
|
+
onEntered: onHandleOpened,
|
|
2227
|
+
onExited: onHandleClosed
|
|
2228
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
2229
|
+
style: popStyles,
|
|
2230
|
+
className: classes,
|
|
2231
|
+
onClick: onHandleClick
|
|
2232
|
+
}, showChildren ? children : "", closeable ? /* @__PURE__ */ React__default.createElement("div", {
|
|
2233
|
+
className: closeClasses,
|
|
2234
|
+
onClick: onHandleClickCloseIcon
|
|
2235
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
2236
|
+
name: closeIcon,
|
|
2237
|
+
size: "12px"
|
|
2238
|
+
})) : ""));
|
|
2239
|
+
};
|
|
2240
|
+
const renderNode = () => {
|
|
2241
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, overlay ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Overlay, {
|
|
2242
|
+
style: overlayStyles,
|
|
2243
|
+
overlayClass,
|
|
2244
|
+
visible: innerVisible,
|
|
2245
|
+
closeOnClickOverlay,
|
|
2246
|
+
zIndex,
|
|
2247
|
+
lockScroll,
|
|
2248
|
+
duration,
|
|
2249
|
+
onClick: onHandleClickOverlay
|
|
2250
|
+
}), renderPop()) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderPop()));
|
|
2251
|
+
};
|
|
2205
2252
|
useEffect(() => {
|
|
2206
2253
|
visible && open();
|
|
2207
2254
|
!visible && close();
|
|
@@ -2209,34 +2256,9 @@ const Popup = (props) => {
|
|
|
2209
2256
|
useEffect(() => {
|
|
2210
2257
|
setTransitionName(transition || `popup-slide-${position}`);
|
|
2211
2258
|
}, [position]);
|
|
2212
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null,
|
|
2213
|
-
style: overlayStyles,
|
|
2214
|
-
visible: innerVisible,
|
|
2215
|
-
closeOnClickOverlay,
|
|
2216
|
-
zIndex,
|
|
2217
|
-
lockScroll,
|
|
2218
|
-
duration,
|
|
2219
|
-
onClick: onHandleClickOverlay
|
|
2220
|
-
}), /* @__PURE__ */ React__default.createElement(CSSTransition$1, {
|
|
2221
|
-
classNames: transitionName,
|
|
2222
|
-
unmountOnExit: true,
|
|
2223
|
-
timeout: 500,
|
|
2224
|
-
in: innerVisible,
|
|
2225
|
-
onEntered: onHandleOpened,
|
|
2226
|
-
onExited: onHandleClosed
|
|
2227
|
-
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
2228
|
-
style: popStyles,
|
|
2229
|
-
className: classes,
|
|
2230
|
-
onClick: onHandleClick
|
|
2231
|
-
}, showChildren ? children : "", closeable ? /* @__PURE__ */ React__default.createElement("div", {
|
|
2232
|
-
className: closeClasses,
|
|
2233
|
-
onClick: onHandleClickCloseIcon
|
|
2234
|
-
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
2235
|
-
name: closeIcon,
|
|
2236
|
-
size: "12px"
|
|
2237
|
-
})) : "")));
|
|
2259
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
|
|
2238
2260
|
};
|
|
2239
|
-
Popup.defaultProps = defaultProps$
|
|
2261
|
+
Popup.defaultProps = defaultProps$16;
|
|
2240
2262
|
Popup.displayName = "NutPopup";
|
|
2241
2263
|
const zhCN = {
|
|
2242
2264
|
save: "\u4FDD\u5B58",
|
|
@@ -2341,7 +2363,7 @@ const zhCN = {
|
|
|
2341
2363
|
title6: "\u6570\u636E\u6539\u53D8\u76D1\u542C"
|
|
2342
2364
|
}
|
|
2343
2365
|
};
|
|
2344
|
-
const defaultProps$
|
|
2366
|
+
const defaultProps$15 = {
|
|
2345
2367
|
locale: zhCN
|
|
2346
2368
|
};
|
|
2347
2369
|
const defaultConfigRef = {
|
|
@@ -2358,7 +2380,7 @@ const useConfig = () => {
|
|
|
2358
2380
|
};
|
|
2359
2381
|
const ConfigContext = createContext(null);
|
|
2360
2382
|
const ConfigProvider = (props) => {
|
|
2361
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
2383
|
+
const { children, ...config2 } = { ...defaultProps$15, ...props };
|
|
2362
2384
|
const parentConfig = useConfig();
|
|
2363
2385
|
return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, {
|
|
2364
2386
|
value: {
|
|
@@ -2367,25 +2389,25 @@ const ConfigProvider = (props) => {
|
|
|
2367
2389
|
}
|
|
2368
2390
|
}, children);
|
|
2369
2391
|
};
|
|
2370
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
2392
|
+
ConfigProvider.defaultProps = defaultProps$15;
|
|
2371
2393
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
2372
|
-
const defaultProps$
|
|
2394
|
+
const defaultProps$14 = {};
|
|
2373
2395
|
const Layout = (props) => {
|
|
2374
|
-
({ ...defaultProps$
|
|
2396
|
+
({ ...defaultProps$14, ...props });
|
|
2375
2397
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2376
2398
|
className: "nut-layout"
|
|
2377
2399
|
}, "Layout");
|
|
2378
2400
|
};
|
|
2379
|
-
Layout.defaultProps = defaultProps$
|
|
2401
|
+
Layout.defaultProps = defaultProps$14;
|
|
2380
2402
|
Layout.displayName = "NutLayout";
|
|
2381
2403
|
const DataContext$2 = createContext({});
|
|
2382
|
-
const defaultProps$
|
|
2404
|
+
const defaultProps$13 = {
|
|
2383
2405
|
span: "24",
|
|
2384
2406
|
offset: "0",
|
|
2385
2407
|
gutter: "0"
|
|
2386
2408
|
};
|
|
2387
2409
|
const Col = (props) => {
|
|
2388
|
-
const { span, offset, children } = { ...defaultProps$
|
|
2410
|
+
const { span, offset, children, onClick } = { ...defaultProps$13, ...props };
|
|
2389
2411
|
const [colName, setColName] = useState("");
|
|
2390
2412
|
const [colStyle, setColStyle] = useState({});
|
|
2391
2413
|
const { gutter } = useContext$1(DataContext$2);
|
|
@@ -2405,12 +2427,15 @@ const Col = (props) => {
|
|
|
2405
2427
|
}, [span, offset, gutter]);
|
|
2406
2428
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2407
2429
|
className: `${colName}`,
|
|
2408
|
-
style: { ...colStyle }
|
|
2430
|
+
style: { ...colStyle },
|
|
2431
|
+
onClick: (e2) => {
|
|
2432
|
+
onClick && onClick(e2, "col");
|
|
2433
|
+
}
|
|
2409
2434
|
}, children);
|
|
2410
2435
|
};
|
|
2411
|
-
Col.defaultProps = defaultProps$
|
|
2436
|
+
Col.defaultProps = defaultProps$13;
|
|
2412
2437
|
Col.displayName = "NutCol";
|
|
2413
|
-
const defaultProps
|
|
2438
|
+
const defaultProps$12 = {
|
|
2414
2439
|
type: "",
|
|
2415
2440
|
justify: "start",
|
|
2416
2441
|
align: "flex-start",
|
|
@@ -2418,13 +2443,15 @@ const defaultProps$$ = {
|
|
|
2418
2443
|
gutter: "0"
|
|
2419
2444
|
};
|
|
2420
2445
|
const Row = (props) => {
|
|
2421
|
-
const { children, type, justify, align, wrap, gutter } = {
|
|
2422
|
-
...defaultProps
|
|
2446
|
+
const { children, type, justify, align, wrap, gutter, onClick } = {
|
|
2447
|
+
...defaultProps$12,
|
|
2423
2448
|
...props
|
|
2424
2449
|
};
|
|
2425
2450
|
const prefixCls = "nut-row";
|
|
2426
2451
|
const getClass = (prefix2, type2) => {
|
|
2427
|
-
|
|
2452
|
+
const classType = type2 ? `nut-row-${prefix2}-${type2}` : "";
|
|
2453
|
+
const className = prefix2 ? classType : `nut-row-${type2}`;
|
|
2454
|
+
return className;
|
|
2428
2455
|
};
|
|
2429
2456
|
const getClasses = () => {
|
|
2430
2457
|
return `
|
|
@@ -2441,12 +2468,15 @@ const Row = (props) => {
|
|
|
2441
2468
|
return /* @__PURE__ */ React__default.createElement(DataContext$2.Provider, {
|
|
2442
2469
|
value: parentRow
|
|
2443
2470
|
}, React__default.createElement("div", {
|
|
2444
|
-
className: getClasses()
|
|
2471
|
+
className: getClasses(),
|
|
2472
|
+
onClick: (e2) => {
|
|
2473
|
+
onClick && onClick(e2, "row");
|
|
2474
|
+
}
|
|
2445
2475
|
}, children));
|
|
2446
2476
|
};
|
|
2447
|
-
Row.defaultProps = defaultProps
|
|
2477
|
+
Row.defaultProps = defaultProps$12;
|
|
2448
2478
|
Row.displayName = "NutRow";
|
|
2449
|
-
const defaultProps$
|
|
2479
|
+
const defaultProps$11 = {
|
|
2450
2480
|
contentPosition: "center",
|
|
2451
2481
|
dashed: false,
|
|
2452
2482
|
hairline: true,
|
|
@@ -2463,7 +2493,7 @@ const Divider = (props) => {
|
|
|
2463
2493
|
direction,
|
|
2464
2494
|
...rest
|
|
2465
2495
|
} = {
|
|
2466
|
-
...defaultProps$
|
|
2496
|
+
...defaultProps$11,
|
|
2467
2497
|
...props
|
|
2468
2498
|
};
|
|
2469
2499
|
const dividerBem = cn("divider");
|
|
@@ -2484,9 +2514,9 @@ const Divider = (props) => {
|
|
|
2484
2514
|
...rest
|
|
2485
2515
|
}, children);
|
|
2486
2516
|
};
|
|
2487
|
-
Divider.defaultProps = defaultProps$
|
|
2517
|
+
Divider.defaultProps = defaultProps$11;
|
|
2488
2518
|
Divider.displayName = "NutDivider";
|
|
2489
|
-
const defaultProps$
|
|
2519
|
+
const defaultProps$10 = {
|
|
2490
2520
|
title: "",
|
|
2491
2521
|
desc: "",
|
|
2492
2522
|
leftShow: true,
|
|
@@ -2519,7 +2549,7 @@ const NavBar = (props) => {
|
|
|
2519
2549
|
onClickBack,
|
|
2520
2550
|
onClickRight
|
|
2521
2551
|
} = {
|
|
2522
|
-
...defaultProps$
|
|
2552
|
+
...defaultProps$10,
|
|
2523
2553
|
...props
|
|
2524
2554
|
};
|
|
2525
2555
|
const b2 = cn("navbar");
|
|
@@ -2584,9 +2614,9 @@ const NavBar = (props) => {
|
|
|
2584
2614
|
className: `${b2("")}--placeholder`
|
|
2585
2615
|
}, renderWrapper()) : renderWrapper());
|
|
2586
2616
|
};
|
|
2587
|
-
NavBar.defaultProps = defaultProps$
|
|
2617
|
+
NavBar.defaultProps = defaultProps$10;
|
|
2588
2618
|
NavBar.displayName = "NutNavBar";
|
|
2589
|
-
const defaultProps
|
|
2619
|
+
const defaultProps$$ = {
|
|
2590
2620
|
fixednavClass: "nut-fixednav",
|
|
2591
2621
|
activeText: "\u6536\u8D77\u5BFC\u822A",
|
|
2592
2622
|
unActiveText: "\u5FEB\u901F\u5BFC\u822A",
|
|
@@ -2612,7 +2642,7 @@ const FixedNav = (props) => {
|
|
|
2612
2642
|
slotList,
|
|
2613
2643
|
slotBtn,
|
|
2614
2644
|
...rest
|
|
2615
|
-
} = { ...defaultProps
|
|
2645
|
+
} = { ...defaultProps$$, ...props };
|
|
2616
2646
|
const b2 = cn("fixednav");
|
|
2617
2647
|
const classes = classNames({
|
|
2618
2648
|
active: visible
|
|
@@ -2658,9 +2688,9 @@ const FixedNav = (props) => {
|
|
|
2658
2688
|
className: "text"
|
|
2659
2689
|
}, visible ? locale.fixednav.activeText || activeText : locale.fixednav.unActiveText || unActiveText))));
|
|
2660
2690
|
};
|
|
2661
|
-
FixedNav.defaultProps = defaultProps
|
|
2691
|
+
FixedNav.defaultProps = defaultProps$$;
|
|
2662
2692
|
FixedNav.displayName = "NutFixedNav";
|
|
2663
|
-
const defaultProps$
|
|
2693
|
+
const defaultProps$_ = {
|
|
2664
2694
|
visible: 0,
|
|
2665
2695
|
bottom: false,
|
|
2666
2696
|
size: 20,
|
|
@@ -2685,12 +2715,12 @@ const Tabbar = (props) => {
|
|
|
2685
2715
|
style,
|
|
2686
2716
|
tabSwitch
|
|
2687
2717
|
} = {
|
|
2688
|
-
...defaultProps$
|
|
2718
|
+
...defaultProps$_,
|
|
2689
2719
|
...props
|
|
2690
2720
|
};
|
|
2691
2721
|
const b2 = cn("tabbar");
|
|
2692
2722
|
const [selectIndex, setSelectIndex] = useState(visible);
|
|
2693
|
-
const
|
|
2723
|
+
const handleClick2 = (idx) => {
|
|
2694
2724
|
setSelectIndex(idx);
|
|
2695
2725
|
};
|
|
2696
2726
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -2713,16 +2743,16 @@ const Tabbar = (props) => {
|
|
|
2713
2743
|
activeColor,
|
|
2714
2744
|
size,
|
|
2715
2745
|
handleClick: () => {
|
|
2716
|
-
|
|
2746
|
+
handleClick2(idx);
|
|
2717
2747
|
tabSwitch(child, idx);
|
|
2718
2748
|
}
|
|
2719
2749
|
};
|
|
2720
2750
|
return React__default.cloneElement(child, childProps);
|
|
2721
2751
|
}));
|
|
2722
2752
|
};
|
|
2723
|
-
Tabbar.defaultProps = defaultProps$
|
|
2753
|
+
Tabbar.defaultProps = defaultProps$_;
|
|
2724
2754
|
Tabbar.displayName = "NutTabbar";
|
|
2725
|
-
const defaultProps$
|
|
2755
|
+
const defaultProps$Z = {
|
|
2726
2756
|
dot: false,
|
|
2727
2757
|
size: "",
|
|
2728
2758
|
classPrefix: "nutui-iconfont",
|
|
@@ -2752,9 +2782,9 @@ const TabbarItem = (props) => {
|
|
|
2752
2782
|
activeColor,
|
|
2753
2783
|
unactiveColor,
|
|
2754
2784
|
index: index2,
|
|
2755
|
-
handleClick
|
|
2785
|
+
handleClick: handleClick2
|
|
2756
2786
|
} = {
|
|
2757
|
-
...defaultProps$
|
|
2787
|
+
...defaultProps$Z,
|
|
2758
2788
|
...props
|
|
2759
2789
|
};
|
|
2760
2790
|
const b2 = cn("tabbar-item");
|
|
@@ -2775,7 +2805,7 @@ const TabbarItem = (props) => {
|
|
|
2775
2805
|
color: active ? activeColor : unactiveColor
|
|
2776
2806
|
},
|
|
2777
2807
|
onClick: () => {
|
|
2778
|
-
|
|
2808
|
+
handleClick2(index2);
|
|
2779
2809
|
}
|
|
2780
2810
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
2781
2811
|
className: `${bIcon()}`
|
|
@@ -2796,7 +2826,7 @@ const TabbarItem = (props) => {
|
|
|
2796
2826
|
}, tabTitle)));
|
|
2797
2827
|
};
|
|
2798
2828
|
const elevatorContext = createContext({});
|
|
2799
|
-
const defaultProps$
|
|
2829
|
+
const defaultProps$Y = {
|
|
2800
2830
|
height: "200px",
|
|
2801
2831
|
acceptKey: "title",
|
|
2802
2832
|
indexList: [],
|
|
@@ -2819,7 +2849,7 @@ const Elevator = (props) => {
|
|
|
2819
2849
|
children,
|
|
2820
2850
|
...rest
|
|
2821
2851
|
} = {
|
|
2822
|
-
...defaultProps$
|
|
2852
|
+
...defaultProps$Y,
|
|
2823
2853
|
...props
|
|
2824
2854
|
};
|
|
2825
2855
|
const b2 = cn("elevator");
|
|
@@ -3009,9 +3039,9 @@ const Elevator = (props) => {
|
|
|
3009
3039
|
}, item[acceptKey]);
|
|
3010
3040
|
}))));
|
|
3011
3041
|
};
|
|
3012
|
-
Elevator.defaultProps = defaultProps$
|
|
3042
|
+
Elevator.defaultProps = defaultProps$Y;
|
|
3013
3043
|
Elevator.displayName = "NutElevator";
|
|
3014
|
-
const defaultProps$
|
|
3044
|
+
const defaultProps$X = {
|
|
3015
3045
|
defaultValue: 1,
|
|
3016
3046
|
mode: "multi",
|
|
3017
3047
|
prevText: "",
|
|
@@ -3028,7 +3058,7 @@ const defaultProps$U = {
|
|
|
3028
3058
|
};
|
|
3029
3059
|
const Pagination = (props) => {
|
|
3030
3060
|
const { locale } = useConfig();
|
|
3031
|
-
({ ...defaultProps$
|
|
3061
|
+
({ ...defaultProps$X, ...props });
|
|
3032
3062
|
const {
|
|
3033
3063
|
modelValue,
|
|
3034
3064
|
mode,
|
|
@@ -3145,7 +3175,7 @@ const Pagination = (props) => {
|
|
|
3145
3175
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
3146
3176
|
}, nextText || locale.pagination.next));
|
|
3147
3177
|
};
|
|
3148
|
-
Pagination.defaultProps = defaultProps$
|
|
3178
|
+
Pagination.defaultProps = defaultProps$X;
|
|
3149
3179
|
Pagination.displayName = "NutPagination";
|
|
3150
3180
|
class Title {
|
|
3151
3181
|
constructor() {
|
|
@@ -3155,7 +3185,7 @@ class Title {
|
|
|
3155
3185
|
this.index = 0;
|
|
3156
3186
|
}
|
|
3157
3187
|
}
|
|
3158
|
-
const defaultProps$
|
|
3188
|
+
const defaultProps$W = {
|
|
3159
3189
|
value: 0,
|
|
3160
3190
|
color: "",
|
|
3161
3191
|
background: "",
|
|
@@ -3190,7 +3220,7 @@ const Tabs = (props) => {
|
|
|
3190
3220
|
className,
|
|
3191
3221
|
autoHeight,
|
|
3192
3222
|
...rest
|
|
3193
|
-
} = { ...defaultProps$
|
|
3223
|
+
} = { ...defaultProps$W, ...props };
|
|
3194
3224
|
const [currentItem, setCurrentItem] = useState({ index: 0 });
|
|
3195
3225
|
const titles = useRef([]);
|
|
3196
3226
|
useEffect(() => {
|
|
@@ -3293,9 +3323,9 @@ const Tabs = (props) => {
|
|
|
3293
3323
|
return React__default.cloneElement(child, childProps);
|
|
3294
3324
|
})));
|
|
3295
3325
|
};
|
|
3296
|
-
Tabs.defaultProps = defaultProps$
|
|
3326
|
+
Tabs.defaultProps = defaultProps$W;
|
|
3297
3327
|
Tabs.displayName = "NutTabs";
|
|
3298
|
-
const defaultProps$
|
|
3328
|
+
const defaultProps$V = {
|
|
3299
3329
|
title: "",
|
|
3300
3330
|
paneKey: "",
|
|
3301
3331
|
activeKey: "",
|
|
@@ -3303,7 +3333,7 @@ const defaultProps$S = {
|
|
|
3303
3333
|
};
|
|
3304
3334
|
const TabPane = (props) => {
|
|
3305
3335
|
const { children, paneKey, activeKey, autoHeightClassName } = {
|
|
3306
|
-
...defaultProps$
|
|
3336
|
+
...defaultProps$V,
|
|
3307
3337
|
...props
|
|
3308
3338
|
};
|
|
3309
3339
|
const b2 = cn("tabpane");
|
|
@@ -3314,7 +3344,7 @@ const TabPane = (props) => {
|
|
|
3314
3344
|
className: classes
|
|
3315
3345
|
}, children);
|
|
3316
3346
|
};
|
|
3317
|
-
const defaultProps$
|
|
3347
|
+
const defaultProps$U = {
|
|
3318
3348
|
size: 3,
|
|
3319
3349
|
current: 1,
|
|
3320
3350
|
block: false,
|
|
@@ -3334,7 +3364,7 @@ const Indicator = (props) => {
|
|
|
3334
3364
|
vertical,
|
|
3335
3365
|
...rest
|
|
3336
3366
|
} = {
|
|
3337
|
-
...defaultProps$
|
|
3367
|
+
...defaultProps$U,
|
|
3338
3368
|
...props
|
|
3339
3369
|
};
|
|
3340
3370
|
const b2 = cn("indicator");
|
|
@@ -3363,8 +3393,141 @@ const Indicator = (props) => {
|
|
|
3363
3393
|
...rest
|
|
3364
3394
|
}, renderEles());
|
|
3365
3395
|
};
|
|
3366
|
-
Indicator.defaultProps = defaultProps$
|
|
3396
|
+
Indicator.defaultProps = defaultProps$U;
|
|
3367
3397
|
Indicator.displayName = "NutIndicator";
|
|
3398
|
+
const handleClick = (e2) => {
|
|
3399
|
+
e2.stopPropagation();
|
|
3400
|
+
const isIcon = e2.target.className.includes("arrow-icon");
|
|
3401
|
+
const isTitle = e2.target.className.includes("__title") || isIcon;
|
|
3402
|
+
const currentClass = e2.currentTarget.className;
|
|
3403
|
+
const isShow = currentClass.includes("nutShow");
|
|
3404
|
+
const arrowIcon = e2.currentTarget.querySelector(".arrow-icon");
|
|
3405
|
+
const iconClass = arrowIcon.className;
|
|
3406
|
+
if (isTitle) {
|
|
3407
|
+
e2.currentTarget.className = isShow ? currentClass.replace("nutShow", "nutHide") : currentClass.replace("nutHide", "nutShow");
|
|
3408
|
+
arrowIcon.className = isShow ? iconClass.replace("arrow-down", "arrow-up") : iconClass.replace("arrow-up", "arrow-down");
|
|
3409
|
+
}
|
|
3410
|
+
};
|
|
3411
|
+
const OffsetContext = createContext(20);
|
|
3412
|
+
const defaultProps$T = {
|
|
3413
|
+
showhead: false,
|
|
3414
|
+
position: "left",
|
|
3415
|
+
width: "80%"
|
|
3416
|
+
};
|
|
3417
|
+
const SideNavBar = (props) => {
|
|
3418
|
+
useConfig();
|
|
3419
|
+
const {
|
|
3420
|
+
title,
|
|
3421
|
+
visible,
|
|
3422
|
+
width,
|
|
3423
|
+
position,
|
|
3424
|
+
children,
|
|
3425
|
+
className,
|
|
3426
|
+
showhead,
|
|
3427
|
+
handleClose,
|
|
3428
|
+
...rest
|
|
3429
|
+
} = {
|
|
3430
|
+
...defaultProps$T,
|
|
3431
|
+
...props
|
|
3432
|
+
};
|
|
3433
|
+
const offset = props.offset ? Number(props.offset) : 20;
|
|
3434
|
+
return /* @__PURE__ */ React__default.createElement(Popup, {
|
|
3435
|
+
visible,
|
|
3436
|
+
style: { width, height: "100%" },
|
|
3437
|
+
position,
|
|
3438
|
+
onClose: handleClose
|
|
3439
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3440
|
+
className: className ? `${className} nut-sidenavbar` : "nut-sidenavbar",
|
|
3441
|
+
...rest
|
|
3442
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3443
|
+
className: "nut-sidenavbar__content"
|
|
3444
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3445
|
+
className: "nut-sidenavbar__list nutShow",
|
|
3446
|
+
onClick: handleClick
|
|
3447
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3448
|
+
className: "nut-sidenavbar__title border-bt ",
|
|
3449
|
+
style: { paddingLeft: `${offset}px` }
|
|
3450
|
+
}, title, " ", /* @__PURE__ */ React__default.createElement("i", {
|
|
3451
|
+
className: "arrow-icon arrow-down"
|
|
3452
|
+
})), /* @__PURE__ */ React__default.createElement(OffsetContext.Provider, {
|
|
3453
|
+
value: offset
|
|
3454
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3455
|
+
className: "nut-sidenavbar__content"
|
|
3456
|
+
}, children))))));
|
|
3457
|
+
};
|
|
3458
|
+
SideNavBar.defaultProps = defaultProps$T;
|
|
3459
|
+
SideNavBar.displayName = "NutSideNavBar";
|
|
3460
|
+
const defaultProps$S = {
|
|
3461
|
+
open: true
|
|
3462
|
+
};
|
|
3463
|
+
const SubSideNavBar = (props) => {
|
|
3464
|
+
const { title, ikey, children, titleClick, open, ...rest } = {
|
|
3465
|
+
...defaultProps$S,
|
|
3466
|
+
...props
|
|
3467
|
+
};
|
|
3468
|
+
const offset = useContext$1(OffsetContext);
|
|
3469
|
+
console.log("offset>>>>>>>", offset);
|
|
3470
|
+
const listRef = useRef(null);
|
|
3471
|
+
const setListLevel = useCallback((nodeList, level = 1) => {
|
|
3472
|
+
const titleClass = nodeList[0].className;
|
|
3473
|
+
if (titleClass.includes("nut-subsidenavbar__title")) {
|
|
3474
|
+
const left = offset * (level + 1);
|
|
3475
|
+
nodeList[0].style.paddingLeft = `${left}px`;
|
|
3476
|
+
}
|
|
3477
|
+
const childNodes = nodeList[1] && nodeList[1].children && Array.from(nodeList[1].children).filter((item) => item.nodeType !== 3 && item.nodeType !== 8);
|
|
3478
|
+
childNodes.forEach((item) => {
|
|
3479
|
+
const itemClass = item.className;
|
|
3480
|
+
if (itemClass.includes("nut-subsidenavbar__item")) {
|
|
3481
|
+
const left = offset * (level + 2);
|
|
3482
|
+
item.style.paddingLeft = `${left}px`;
|
|
3483
|
+
}
|
|
3484
|
+
if (itemClass.includes("nut-subsidenavbar__list")) {
|
|
3485
|
+
let level2 = item.getAttribute("level") ? Number(item.getAttribute("level")) : 1;
|
|
3486
|
+
level2 += 1;
|
|
3487
|
+
item.setAttribute("level", level2.toString());
|
|
3488
|
+
item.children && setListLevel(item.children, level2);
|
|
3489
|
+
}
|
|
3490
|
+
});
|
|
3491
|
+
}, [offset]);
|
|
3492
|
+
const clickFn = (e2) => {
|
|
3493
|
+
handleClick(e2);
|
|
3494
|
+
const currentClass = e2.currentTarget.className;
|
|
3495
|
+
const isShow = currentClass.includes("nutShow");
|
|
3496
|
+
titleClick && titleClick({ title, ikey, isShow });
|
|
3497
|
+
};
|
|
3498
|
+
useEffect(() => {
|
|
3499
|
+
var _a, _b;
|
|
3500
|
+
const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
|
|
3501
|
+
(_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
|
|
3502
|
+
childNodes && setListLevel(childNodes);
|
|
3503
|
+
}, [setListLevel]);
|
|
3504
|
+
const divClass = open ? "nut-subsidenavbar__list nutShow" : "nut-subsidenavbar__list nutHide";
|
|
3505
|
+
const iconClass = open ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
|
|
3506
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
3507
|
+
className: divClass,
|
|
3508
|
+
ref: listRef,
|
|
3509
|
+
onClick: clickFn,
|
|
3510
|
+
...rest
|
|
3511
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3512
|
+
className: "nut-subsidenavbar__title border-bt"
|
|
3513
|
+
}, title, " ", /* @__PURE__ */ React__default.createElement("i", {
|
|
3514
|
+
className: iconClass
|
|
3515
|
+
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
3516
|
+
className: "nut-subsidenavbar__content"
|
|
3517
|
+
}, children));
|
|
3518
|
+
};
|
|
3519
|
+
const SideNavBarItem = (props) => {
|
|
3520
|
+
const { title, ikey, children, click, ...rest } = props;
|
|
3521
|
+
const clickFn = (e2) => {
|
|
3522
|
+
e2.stopPropagation();
|
|
3523
|
+
click && click({ title, ikey });
|
|
3524
|
+
};
|
|
3525
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
3526
|
+
className: "nut-subsidenavbar__item border-bt",
|
|
3527
|
+
onClick: clickFn,
|
|
3528
|
+
...rest
|
|
3529
|
+
}, title);
|
|
3530
|
+
};
|
|
3368
3531
|
const MIN_DISTANCE = 10;
|
|
3369
3532
|
function getDirection(x2, y2) {
|
|
3370
3533
|
if (x2 > y2 && x2 > MIN_DISTANCE) {
|
|
@@ -3650,7 +3813,7 @@ var Toast = {
|
|
|
3650
3813
|
}
|
|
3651
3814
|
}
|
|
3652
3815
|
};
|
|
3653
|
-
const defaultProps$
|
|
3816
|
+
const defaultProps$R = {
|
|
3654
3817
|
range: false,
|
|
3655
3818
|
hiddenRange: false,
|
|
3656
3819
|
hiddenTag: false,
|
|
@@ -3684,7 +3847,7 @@ const Range = (props) => {
|
|
|
3684
3847
|
change,
|
|
3685
3848
|
dragStart,
|
|
3686
3849
|
dragEnd
|
|
3687
|
-
} = { ...defaultProps$
|
|
3850
|
+
} = { ...defaultProps$R, ...props };
|
|
3688
3851
|
const [buttonIndex, SetButtonIndex] = useState(0);
|
|
3689
3852
|
const [initValue, SetInitValue] = useState();
|
|
3690
3853
|
const [dragStatus, SetDragStatus] = useState("start");
|
|
@@ -4013,7 +4176,7 @@ const Range = (props) => {
|
|
|
4013
4176
|
className: "max"
|
|
4014
4177
|
}, +max) : null);
|
|
4015
4178
|
};
|
|
4016
|
-
Range.defaultProps = defaultProps$
|
|
4179
|
+
Range.defaultProps = defaultProps$R;
|
|
4017
4180
|
Range.displayName = "NutRange";
|
|
4018
4181
|
const Utils = {
|
|
4019
4182
|
isLeapYear(y2) {
|
|
@@ -4107,7 +4270,7 @@ function requestAniFrame() {
|
|
|
4107
4270
|
};
|
|
4108
4271
|
}
|
|
4109
4272
|
var requestAniFrame$1 = requestAniFrame();
|
|
4110
|
-
const defaultProps$
|
|
4273
|
+
const defaultProps$Q = {
|
|
4111
4274
|
type: "one",
|
|
4112
4275
|
isAutoBackFill: false,
|
|
4113
4276
|
poppable: true,
|
|
@@ -4136,7 +4299,7 @@ const CalendarItem = (props) => {
|
|
|
4136
4299
|
onChoose,
|
|
4137
4300
|
onUpdate,
|
|
4138
4301
|
onClose
|
|
4139
|
-
} = { ...defaultProps$
|
|
4302
|
+
} = { ...defaultProps$Q, ...props };
|
|
4140
4303
|
const weeks = locale.calendaritem.weekdays;
|
|
4141
4304
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
4142
4305
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -4532,9 +4695,9 @@ const CalendarItem = (props) => {
|
|
|
4532
4695
|
onClick: confirm2
|
|
4533
4696
|
}, locale.confirm)) : ""));
|
|
4534
4697
|
};
|
|
4535
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4698
|
+
CalendarItem.defaultProps = defaultProps$Q;
|
|
4536
4699
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4537
|
-
const defaultProps$
|
|
4700
|
+
const defaultProps$P = {
|
|
4538
4701
|
type: "one",
|
|
4539
4702
|
isAutoBackFill: false,
|
|
4540
4703
|
poppable: true,
|
|
@@ -4562,7 +4725,7 @@ const Calendar = (props) => {
|
|
|
4562
4725
|
endDate,
|
|
4563
4726
|
onClose,
|
|
4564
4727
|
onChoose
|
|
4565
|
-
} = { ...defaultProps$
|
|
4728
|
+
} = { ...defaultProps$P, ...props };
|
|
4566
4729
|
const close = () => {
|
|
4567
4730
|
onClose && onClose();
|
|
4568
4731
|
};
|
|
@@ -4605,9 +4768,9 @@ const Calendar = (props) => {
|
|
|
4605
4768
|
onChoose: choose
|
|
4606
4769
|
}));
|
|
4607
4770
|
};
|
|
4608
|
-
Calendar.defaultProps = defaultProps$
|
|
4771
|
+
Calendar.defaultProps = defaultProps$P;
|
|
4609
4772
|
Calendar.displayName = "NutCalendar";
|
|
4610
|
-
const defaultProps$
|
|
4773
|
+
const defaultProps$O = {
|
|
4611
4774
|
disabled: false,
|
|
4612
4775
|
checkedValue: [],
|
|
4613
4776
|
max: void 0,
|
|
@@ -4615,7 +4778,7 @@ const defaultProps$N = {
|
|
|
4615
4778
|
}
|
|
4616
4779
|
};
|
|
4617
4780
|
const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
4618
|
-
const { children } = { ...defaultProps$
|
|
4781
|
+
const { children } = { ...defaultProps$O, ...props };
|
|
4619
4782
|
const b2 = cn("checkboxgroup");
|
|
4620
4783
|
const { className, disabled, onChange, checkedValue, max, ...rest } = props;
|
|
4621
4784
|
const [innerDisabled, setInnerDisabled] = useState(disabled);
|
|
@@ -4691,9 +4854,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
4691
4854
|
...rest
|
|
4692
4855
|
}, cloneChildren());
|
|
4693
4856
|
});
|
|
4694
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4857
|
+
CheckboxGroup.defaultProps = defaultProps$O;
|
|
4695
4858
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4696
|
-
const defaultProps$
|
|
4859
|
+
const defaultProps$N = {
|
|
4697
4860
|
checked: false,
|
|
4698
4861
|
disabled: false,
|
|
4699
4862
|
textPosition: "right",
|
|
@@ -4707,7 +4870,7 @@ const defaultProps$M = {
|
|
|
4707
4870
|
}
|
|
4708
4871
|
};
|
|
4709
4872
|
const Checkbox = (props) => {
|
|
4710
|
-
const { children } = { ...defaultProps$
|
|
4873
|
+
const { children } = { ...defaultProps$N, ...props };
|
|
4711
4874
|
const b2 = cn("checkbox");
|
|
4712
4875
|
const {
|
|
4713
4876
|
iconName,
|
|
@@ -4772,7 +4935,7 @@ const Checkbox = (props) => {
|
|
|
4772
4935
|
className: `${b2("label", { disabled: innerDisabled })} `
|
|
4773
4936
|
}, children || label);
|
|
4774
4937
|
};
|
|
4775
|
-
const
|
|
4938
|
+
const handleClick2 = () => {
|
|
4776
4939
|
if (!disabled) {
|
|
4777
4940
|
const latest = !innerChecked;
|
|
4778
4941
|
if (max !== void 0 && latest && getParentVals().length >= max)
|
|
@@ -4784,10 +4947,10 @@ const Checkbox = (props) => {
|
|
|
4784
4947
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
4785
4948
|
className: `${b2({ reverse: textPosition === "left" })} ${className || ""}`,
|
|
4786
4949
|
...rest,
|
|
4787
|
-
onClick:
|
|
4950
|
+
onClick: handleClick2
|
|
4788
4951
|
}, renderIcon(), renderLabel());
|
|
4789
4952
|
};
|
|
4790
|
-
Checkbox.defaultProps = defaultProps$
|
|
4953
|
+
Checkbox.defaultProps = defaultProps$N;
|
|
4791
4954
|
Checkbox.displayName = "NutCheckBox";
|
|
4792
4955
|
Checkbox.Group = CheckboxGroup;
|
|
4793
4956
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -4951,12 +5114,12 @@ const InternalPickerSlot = (props, ref) => {
|
|
|
4951
5114
|
transform: `rotate3d(1, 0, 0, ${-rotation * (index2 + 1)}deg) translate3d(0px, 0px, 104px)`
|
|
4952
5115
|
},
|
|
4953
5116
|
key: item.value ? item.value : index2
|
|
4954
|
-
}, item.text ? item.text : item);
|
|
5117
|
+
}, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.text ? item.text : item));
|
|
4955
5118
|
}), !threeDimensional && listData.map((item, index2) => {
|
|
4956
5119
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
4957
5120
|
className: "nut-picker-roller-item-tile",
|
|
4958
5121
|
key: item.value ? item.value : index2
|
|
4959
|
-
}, item.text ? item.text : item);
|
|
5122
|
+
}, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.text ? item.text : item));
|
|
4960
5123
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
4961
5124
|
className: "nut-picker-mask"
|
|
4962
5125
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -5098,8 +5261,8 @@ const InternalPicker = (props, ref) => {
|
|
|
5098
5261
|
const data = [];
|
|
5099
5262
|
const normalData = normalListData();
|
|
5100
5263
|
setColumnsList(normalData);
|
|
5101
|
-
normalData.map((item) => {
|
|
5102
|
-
data.push(item[0].value);
|
|
5264
|
+
normalData.length > 0 && normalData.map((item) => {
|
|
5265
|
+
item[0] && data.push(item[0].value);
|
|
5103
5266
|
return item;
|
|
5104
5267
|
});
|
|
5105
5268
|
if (!defaultValueData && chooseValueData.length === 0) {
|
|
@@ -5142,7 +5305,7 @@ const InternalPicker = (props, ref) => {
|
|
|
5142
5305
|
};
|
|
5143
5306
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
5144
5307
|
const currentYear = new Date().getFullYear();
|
|
5145
|
-
const defaultProps$
|
|
5308
|
+
const defaultProps$M = {
|
|
5146
5309
|
modelValue: null,
|
|
5147
5310
|
visible: false,
|
|
5148
5311
|
title: "",
|
|
@@ -5172,7 +5335,7 @@ const DatePicker = (props) => {
|
|
|
5172
5335
|
style,
|
|
5173
5336
|
...rest
|
|
5174
5337
|
} = {
|
|
5175
|
-
...defaultProps$
|
|
5338
|
+
...defaultProps$M,
|
|
5176
5339
|
...props
|
|
5177
5340
|
};
|
|
5178
5341
|
const [show, setShow] = useState(false);
|
|
@@ -5418,9 +5581,9 @@ const DatePicker = (props) => {
|
|
|
5418
5581
|
ref: pickerRef
|
|
5419
5582
|
}));
|
|
5420
5583
|
};
|
|
5421
|
-
DatePicker.defaultProps = defaultProps$
|
|
5584
|
+
DatePicker.defaultProps = defaultProps$M;
|
|
5422
5585
|
DatePicker.displayName = "NutDatePicker";
|
|
5423
|
-
const defaultProps$
|
|
5586
|
+
const defaultProps$L = {
|
|
5424
5587
|
disabled: false,
|
|
5425
5588
|
buttonSize: "",
|
|
5426
5589
|
min: 1,
|
|
@@ -5458,7 +5621,7 @@ const InputNumber = (props) => {
|
|
|
5458
5621
|
focus,
|
|
5459
5622
|
...restProps
|
|
5460
5623
|
} = {
|
|
5461
|
-
...defaultProps$
|
|
5624
|
+
...defaultProps$L,
|
|
5462
5625
|
...props
|
|
5463
5626
|
};
|
|
5464
5627
|
const [inputValue, setInputValue] = useState(modelValue);
|
|
@@ -5579,7 +5742,7 @@ const InputNumber = (props) => {
|
|
|
5579
5742
|
click: addNumber
|
|
5580
5743
|
}));
|
|
5581
5744
|
};
|
|
5582
|
-
InputNumber.defaultProps = defaultProps$
|
|
5745
|
+
InputNumber.defaultProps = defaultProps$L;
|
|
5583
5746
|
InputNumber.displayName = "NutInputNumber";
|
|
5584
5747
|
function trimExtraChar(value, char, regExp) {
|
|
5585
5748
|
const index2 = value.indexOf(char);
|
|
@@ -5605,7 +5768,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5605
5768
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5606
5769
|
return value.replace(regExp, "");
|
|
5607
5770
|
}
|
|
5608
|
-
const defaultProps$
|
|
5771
|
+
const defaultProps$K = {
|
|
5609
5772
|
type: "text",
|
|
5610
5773
|
defaultValue: "",
|
|
5611
5774
|
placeholder: "",
|
|
@@ -5688,7 +5851,7 @@ const Input = (props) => {
|
|
|
5688
5851
|
clickRightIcon,
|
|
5689
5852
|
click,
|
|
5690
5853
|
...rest
|
|
5691
|
-
} = { ...defaultProps$
|
|
5854
|
+
} = { ...defaultProps$K, ...props };
|
|
5692
5855
|
locale.placeholder = placeholder || locale.placeholder;
|
|
5693
5856
|
const [inputValue, SetInputValue] = useState("");
|
|
5694
5857
|
const [active, SetActive] = useState(false);
|
|
@@ -5895,14 +6058,14 @@ const Input = (props) => {
|
|
|
5895
6058
|
}
|
|
5896
6059
|
}, errorMessage) : null)));
|
|
5897
6060
|
};
|
|
5898
|
-
Input.defaultProps = defaultProps$
|
|
6061
|
+
Input.defaultProps = defaultProps$K;
|
|
5899
6062
|
Input.displayName = "NutInput";
|
|
5900
6063
|
const radioContext = {
|
|
5901
6064
|
onChange: (val) => {
|
|
5902
6065
|
}
|
|
5903
6066
|
};
|
|
5904
6067
|
var RadioContext = React__default.createContext(radioContext);
|
|
5905
|
-
const defaultProps$
|
|
6068
|
+
const defaultProps$J = {
|
|
5906
6069
|
value: null,
|
|
5907
6070
|
textPosition: "right",
|
|
5908
6071
|
onChange: (value) => {
|
|
@@ -5910,7 +6073,7 @@ const defaultProps$I = {
|
|
|
5910
6073
|
direction: "vertical"
|
|
5911
6074
|
};
|
|
5912
6075
|
const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
5913
|
-
const { children } = { ...defaultProps$
|
|
6076
|
+
const { children } = { ...defaultProps$J, ...props };
|
|
5914
6077
|
cn("RadioGroup");
|
|
5915
6078
|
const { className, value, onChange, textPosition, direction, ...rest } = props;
|
|
5916
6079
|
const [val2State, setVal2State] = useState(value);
|
|
@@ -5946,9 +6109,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
|
5946
6109
|
...rest
|
|
5947
6110
|
}, cloneChildren()));
|
|
5948
6111
|
});
|
|
5949
|
-
RadioGroup.defaultProps = defaultProps$
|
|
6112
|
+
RadioGroup.defaultProps = defaultProps$J;
|
|
5950
6113
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5951
|
-
const defaultProps$
|
|
6114
|
+
const defaultProps$I = {
|
|
5952
6115
|
disabled: false,
|
|
5953
6116
|
checked: false,
|
|
5954
6117
|
shape: "round",
|
|
@@ -5961,7 +6124,7 @@ const defaultProps$H = {
|
|
|
5961
6124
|
}
|
|
5962
6125
|
};
|
|
5963
6126
|
const Radio = (props) => {
|
|
5964
|
-
const { children } = { ...defaultProps$
|
|
6127
|
+
const { children } = { ...defaultProps$I, ...props };
|
|
5965
6128
|
const {
|
|
5966
6129
|
className,
|
|
5967
6130
|
disabled,
|
|
@@ -6021,7 +6184,7 @@ const Radio = (props) => {
|
|
|
6021
6184
|
}
|
|
6022
6185
|
return [renderIcon(), renderLabel()];
|
|
6023
6186
|
};
|
|
6024
|
-
const
|
|
6187
|
+
const handleClick2 = (e2) => {
|
|
6025
6188
|
if (disabledStatement || checkedStatement)
|
|
6026
6189
|
return;
|
|
6027
6190
|
setCheckedStatement(!checkedStatement);
|
|
@@ -6031,14 +6194,14 @@ const Radio = (props) => {
|
|
|
6031
6194
|
const reverseState = textPosition === "left";
|
|
6032
6195
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6033
6196
|
className: `nut-radio ${className}`,
|
|
6034
|
-
onClick:
|
|
6197
|
+
onClick: handleClick2,
|
|
6035
6198
|
...rest
|
|
6036
6199
|
}, renderRadioItem());
|
|
6037
6200
|
};
|
|
6038
|
-
Radio.defaultProps = defaultProps$
|
|
6201
|
+
Radio.defaultProps = defaultProps$I;
|
|
6039
6202
|
Radio.displayName = "NutRadio";
|
|
6040
6203
|
Radio.RadioGroup = RadioGroup;
|
|
6041
|
-
const defaultProps$
|
|
6204
|
+
const defaultProps$H = {
|
|
6042
6205
|
count: 5,
|
|
6043
6206
|
modelValue: 0,
|
|
6044
6207
|
minimizeValue: 0,
|
|
@@ -6067,7 +6230,7 @@ const Rate = (props) => {
|
|
|
6067
6230
|
allowHalf,
|
|
6068
6231
|
spacing,
|
|
6069
6232
|
change
|
|
6070
|
-
} = { ...defaultProps$
|
|
6233
|
+
} = { ...defaultProps$H, ...props };
|
|
6071
6234
|
const b2 = cn("rate");
|
|
6072
6235
|
const bi = cn("rate-item");
|
|
6073
6236
|
const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
|
|
@@ -6131,9 +6294,9 @@ const Rate = (props) => {
|
|
|
6131
6294
|
}));
|
|
6132
6295
|
}));
|
|
6133
6296
|
};
|
|
6134
|
-
Rate.defaultProps = defaultProps$
|
|
6297
|
+
Rate.defaultProps = defaultProps$H;
|
|
6135
6298
|
Rate.displayName = "NutRate";
|
|
6136
|
-
const defaultProps$
|
|
6299
|
+
const defaultProps$G = {
|
|
6137
6300
|
title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
6138
6301
|
desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
|
|
6139
6302
|
tips: "\u5FD8\u8BB0\u5BC6\u7801",
|
|
@@ -6293,9 +6456,9 @@ const ShortPassword = (props) => {
|
|
|
6293
6456
|
onClick: () => sure()
|
|
6294
6457
|
}, locale.confirm)) : null)));
|
|
6295
6458
|
};
|
|
6296
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6459
|
+
ShortPassword.defaultProps = defaultProps$G;
|
|
6297
6460
|
ShortPassword.displayName = "NutShortPassword";
|
|
6298
|
-
const defaultProps$
|
|
6461
|
+
const defaultProps$F = {
|
|
6299
6462
|
defaultValue: "",
|
|
6300
6463
|
textAlign: "left",
|
|
6301
6464
|
limitshow: false,
|
|
@@ -6323,7 +6486,7 @@ const TextArea = (props) => {
|
|
|
6323
6486
|
onChange,
|
|
6324
6487
|
onBlur,
|
|
6325
6488
|
onFocus
|
|
6326
|
-
} = { ...defaultProps$
|
|
6489
|
+
} = { ...defaultProps$F, ...props };
|
|
6327
6490
|
const textareaBem = cn("textarea");
|
|
6328
6491
|
const [inputValue, SetInputValue] = useState("");
|
|
6329
6492
|
useEffect(() => {
|
|
@@ -6387,7 +6550,7 @@ const TextArea = (props) => {
|
|
|
6387
6550
|
className: textareaBem("limit")
|
|
6388
6551
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6389
6552
|
};
|
|
6390
|
-
TextArea.defaultProps = defaultProps$
|
|
6553
|
+
TextArea.defaultProps = defaultProps$F;
|
|
6391
6554
|
TextArea.displayName = "NutTextArea";
|
|
6392
6555
|
class UploadOptions {
|
|
6393
6556
|
constructor() {
|
|
@@ -6436,7 +6599,7 @@ class Upload {
|
|
|
6436
6599
|
}
|
|
6437
6600
|
}
|
|
6438
6601
|
}
|
|
6439
|
-
const defaultProps$
|
|
6602
|
+
const defaultProps$E = {
|
|
6440
6603
|
url: "",
|
|
6441
6604
|
maximum: 1,
|
|
6442
6605
|
uploadIcon: "photograph",
|
|
@@ -6511,7 +6674,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6511
6674
|
beforeUpload,
|
|
6512
6675
|
beforeDelete,
|
|
6513
6676
|
...restProps
|
|
6514
|
-
} = { ...defaultProps$
|
|
6677
|
+
} = { ...defaultProps$E, ...props };
|
|
6515
6678
|
const [fileList, setFileList] = useState([]);
|
|
6516
6679
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
6517
6680
|
useEffect(() => {
|
|
@@ -6800,9 +6963,9 @@ const InternalUploader = (props, ref) => {
|
|
|
6800
6963
|
})));
|
|
6801
6964
|
};
|
|
6802
6965
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6803
|
-
Uploader.defaultProps = defaultProps$
|
|
6966
|
+
Uploader.defaultProps = defaultProps$E;
|
|
6804
6967
|
Uploader.displayName = "NutUploader";
|
|
6805
|
-
const defaultProps$
|
|
6968
|
+
const defaultProps$D = {
|
|
6806
6969
|
placeholder: "",
|
|
6807
6970
|
shape: "square",
|
|
6808
6971
|
disabled: false,
|
|
@@ -6849,7 +7012,7 @@ const SearchBar = (props) => {
|
|
|
6849
7012
|
onClickRightinIcon,
|
|
6850
7013
|
onClickRightoutIcon
|
|
6851
7014
|
} = {
|
|
6852
|
-
...defaultProps$
|
|
7015
|
+
...defaultProps$D,
|
|
6853
7016
|
...props
|
|
6854
7017
|
};
|
|
6855
7018
|
const alignClass = `${align}`;
|
|
@@ -6986,9 +7149,9 @@ const SearchBar = (props) => {
|
|
|
6986
7149
|
className: `${searchbarBem("content")}`
|
|
6987
7150
|
}, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
6988
7151
|
};
|
|
6989
|
-
SearchBar.defaultProps = defaultProps$
|
|
7152
|
+
SearchBar.defaultProps = defaultProps$D;
|
|
6990
7153
|
SearchBar.displayName = "NutSearchBar";
|
|
6991
|
-
const defaultProps$
|
|
7154
|
+
const defaultProps$C = {
|
|
6992
7155
|
confirmText: "",
|
|
6993
7156
|
title: "",
|
|
6994
7157
|
visible: false,
|
|
@@ -7175,9 +7338,9 @@ const NumberKeyboard = (props) => {
|
|
|
7175
7338
|
})
|
|
7176
7339
|
}, confirmText || locale.done))) : null))));
|
|
7177
7340
|
};
|
|
7178
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7341
|
+
NumberKeyboard.defaultProps = defaultProps$C;
|
|
7179
7342
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7180
|
-
const defaultProps$
|
|
7343
|
+
const defaultProps$B = {
|
|
7181
7344
|
cancelTxt: "",
|
|
7182
7345
|
optionTag: "name",
|
|
7183
7346
|
optionSubTag: "subname",
|
|
@@ -7210,7 +7373,7 @@ const ActionSheet = (props) => {
|
|
|
7210
7373
|
className,
|
|
7211
7374
|
style,
|
|
7212
7375
|
...rest
|
|
7213
|
-
} = { ...defaultProps$
|
|
7376
|
+
} = { ...defaultProps$B, ...props };
|
|
7214
7377
|
const b2 = cn("actionsheet");
|
|
7215
7378
|
const isHighlight = (item) => {
|
|
7216
7379
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
@@ -7254,9 +7417,9 @@ const ActionSheet = (props) => {
|
|
|
7254
7417
|
onClick: () => cancelActionSheet()
|
|
7255
7418
|
}, cancelTxt)));
|
|
7256
7419
|
};
|
|
7257
|
-
ActionSheet.defaultProps = defaultProps$
|
|
7420
|
+
ActionSheet.defaultProps = defaultProps$B;
|
|
7258
7421
|
ActionSheet.displayName = "NutActionSheet";
|
|
7259
|
-
const defaultProps$
|
|
7422
|
+
const defaultProps$A = {
|
|
7260
7423
|
bottom: 20,
|
|
7261
7424
|
right: 10,
|
|
7262
7425
|
elId: "body",
|
|
@@ -7279,7 +7442,7 @@ const BackTop = (props) => {
|
|
|
7279
7442
|
style,
|
|
7280
7443
|
onClick
|
|
7281
7444
|
} = {
|
|
7282
|
-
...defaultProps$
|
|
7445
|
+
...defaultProps$A,
|
|
7283
7446
|
...props
|
|
7284
7447
|
};
|
|
7285
7448
|
const [backTop, SetBackTop] = useState(false);
|
|
@@ -7368,7 +7531,7 @@ const BackTop = (props) => {
|
|
|
7368
7531
|
name: "top"
|
|
7369
7532
|
}));
|
|
7370
7533
|
};
|
|
7371
|
-
BackTop.defaultProps = defaultProps$
|
|
7534
|
+
BackTop.defaultProps = defaultProps$A;
|
|
7372
7535
|
BackTop.displayName = "NutBackTop";
|
|
7373
7536
|
function clamp(v2, min, max) {
|
|
7374
7537
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -11771,7 +11934,7 @@ const host = createHost(primitives, {
|
|
|
11771
11934
|
}
|
|
11772
11935
|
});
|
|
11773
11936
|
const animated = host.animated;
|
|
11774
|
-
const defaultProps$
|
|
11937
|
+
const defaultProps$z = {
|
|
11775
11938
|
attract: false,
|
|
11776
11939
|
direction: void 0,
|
|
11777
11940
|
boundary: {
|
|
@@ -11784,7 +11947,7 @@ const defaultProps$y = {
|
|
|
11784
11947
|
};
|
|
11785
11948
|
const Drag = (props) => {
|
|
11786
11949
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
11787
|
-
...defaultProps$
|
|
11950
|
+
...defaultProps$z,
|
|
11788
11951
|
...props
|
|
11789
11952
|
};
|
|
11790
11953
|
const b2 = cn("drag");
|
|
@@ -11843,7 +12006,7 @@ const Drag = (props) => {
|
|
|
11843
12006
|
...bind()
|
|
11844
12007
|
}, children));
|
|
11845
12008
|
};
|
|
11846
|
-
Drag.defaultProps = defaultProps$
|
|
12009
|
+
Drag.defaultProps = defaultProps$z;
|
|
11847
12010
|
Drag.displayName = "NutDrag";
|
|
11848
12011
|
const Content = (props) => {
|
|
11849
12012
|
const {
|
|
@@ -11869,12 +12032,12 @@ const Content = (props) => {
|
|
|
11869
12032
|
})
|
|
11870
12033
|
}, footer);
|
|
11871
12034
|
}
|
|
11872
|
-
const
|
|
12035
|
+
const handleClick2 = () => {
|
|
11873
12036
|
onClickSelf && onClickSelf();
|
|
11874
12037
|
};
|
|
11875
12038
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
11876
12039
|
className: "nut-dialog__outer",
|
|
11877
|
-
onClick:
|
|
12040
|
+
onClick: handleClick2
|
|
11878
12041
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
11879
12042
|
className: "nut-dialog",
|
|
11880
12043
|
style: { display: visible ? "flex" : "none" }
|
|
@@ -11900,7 +12063,7 @@ const DialogWrap = (props) => {
|
|
|
11900
12063
|
onClosed,
|
|
11901
12064
|
onCancel
|
|
11902
12065
|
} = props;
|
|
11903
|
-
const
|
|
12066
|
+
const handleClick2 = (e2) => {
|
|
11904
12067
|
if (closeOnClickOverlay && visible && e2.target === e2.currentTarget) {
|
|
11905
12068
|
onClosed == null ? void 0 : onClosed();
|
|
11906
12069
|
onCancel == null ? void 0 : onCancel();
|
|
@@ -11922,7 +12085,7 @@ const DialogWrap = (props) => {
|
|
|
11922
12085
|
appear: true
|
|
11923
12086
|
}, /* @__PURE__ */ React__default.createElement(Mask, null)) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
11924
12087
|
className: classNames("nut-dialog__wrap", className),
|
|
11925
|
-
onClick:
|
|
12088
|
+
onClick: handleClick2,
|
|
11926
12089
|
style: wrapStyle
|
|
11927
12090
|
}, /* @__PURE__ */ React__default.createElement(Content, {
|
|
11928
12091
|
...props,
|
|
@@ -12035,7 +12198,7 @@ function confirm(config2, renderFunc) {
|
|
|
12035
12198
|
update: update2
|
|
12036
12199
|
};
|
|
12037
12200
|
}
|
|
12038
|
-
const defaultProps$
|
|
12201
|
+
const defaultProps$y = {
|
|
12039
12202
|
okText: "",
|
|
12040
12203
|
cancelText: "",
|
|
12041
12204
|
mask: true,
|
|
@@ -12126,9 +12289,9 @@ Dialog.confirm = (props) => {
|
|
|
12126
12289
|
});
|
|
12127
12290
|
};
|
|
12128
12291
|
});
|
|
12129
|
-
Dialog.defaultProps = defaultProps$
|
|
12292
|
+
Dialog.defaultProps = defaultProps$y;
|
|
12130
12293
|
Dialog.displayName = "NutDialog";
|
|
12131
|
-
const defaultProps$
|
|
12294
|
+
const defaultProps$x = {
|
|
12132
12295
|
hasMore: true,
|
|
12133
12296
|
threshold: 200,
|
|
12134
12297
|
containerId: "",
|
|
@@ -12162,7 +12325,7 @@ const Infiniteloading = (props) => {
|
|
|
12162
12325
|
scrollChange,
|
|
12163
12326
|
...restProps
|
|
12164
12327
|
} = {
|
|
12165
|
-
...defaultProps$
|
|
12328
|
+
...defaultProps$x,
|
|
12166
12329
|
...props
|
|
12167
12330
|
};
|
|
12168
12331
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -12319,7 +12482,7 @@ const Infiniteloading = (props) => {
|
|
|
12319
12482
|
className: "tips"
|
|
12320
12483
|
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
12321
12484
|
};
|
|
12322
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
12485
|
+
Infiniteloading.defaultProps = defaultProps$x;
|
|
12323
12486
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
12324
12487
|
class Notification extends React.PureComponent {
|
|
12325
12488
|
constructor(props) {
|
|
@@ -12478,7 +12641,7 @@ var Notify = {
|
|
|
12478
12641
|
}
|
|
12479
12642
|
}
|
|
12480
12643
|
};
|
|
12481
|
-
const defaultProps$
|
|
12644
|
+
const defaultProps$w = {
|
|
12482
12645
|
isAsync: false,
|
|
12483
12646
|
checked: false,
|
|
12484
12647
|
disable: false,
|
|
@@ -12501,7 +12664,7 @@ const Switch = (props) => {
|
|
|
12501
12664
|
className,
|
|
12502
12665
|
style
|
|
12503
12666
|
} = {
|
|
12504
|
-
...defaultProps$
|
|
12667
|
+
...defaultProps$w,
|
|
12505
12668
|
...props
|
|
12506
12669
|
};
|
|
12507
12670
|
const [value, setValue] = useState(false);
|
|
@@ -12541,10 +12704,10 @@ const Switch = (props) => {
|
|
|
12541
12704
|
className: `${b2("label")} close`
|
|
12542
12705
|
}, inactiveText))));
|
|
12543
12706
|
};
|
|
12544
|
-
Switch.defaultProps = defaultProps$
|
|
12707
|
+
Switch.defaultProps = defaultProps$w;
|
|
12545
12708
|
Switch.displayName = "NutSwitch";
|
|
12546
12709
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
12547
|
-
const defaultProps$
|
|
12710
|
+
const defaultProps$v = {
|
|
12548
12711
|
strokeWidth: 5,
|
|
12549
12712
|
radius: 50,
|
|
12550
12713
|
strokeLinecap: "round",
|
|
@@ -12567,7 +12730,7 @@ const CircleProgress = (props) => {
|
|
|
12567
12730
|
strokeLinecap,
|
|
12568
12731
|
...restProps
|
|
12569
12732
|
} = {
|
|
12570
|
-
...defaultProps$
|
|
12733
|
+
...defaultProps$v,
|
|
12571
12734
|
...props
|
|
12572
12735
|
};
|
|
12573
12736
|
const b2 = cn("circleprogress");
|
|
@@ -12651,9 +12814,9 @@ const CircleProgress = (props) => {
|
|
|
12651
12814
|
className: "nut-circleprogress-text"
|
|
12652
12815
|
}, children || /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
12653
12816
|
};
|
|
12654
|
-
CircleProgress.defaultProps = defaultProps$
|
|
12817
|
+
CircleProgress.defaultProps = defaultProps$v;
|
|
12655
12818
|
CircleProgress.displayName = "NutCircleProgress";
|
|
12656
|
-
const defaultProps$
|
|
12819
|
+
const defaultProps$u = {
|
|
12657
12820
|
direction: "across",
|
|
12658
12821
|
list: [],
|
|
12659
12822
|
standTime: 1e3,
|
|
@@ -12691,7 +12854,7 @@ const NoticeBar = (props) => {
|
|
|
12691
12854
|
rightIcon,
|
|
12692
12855
|
close,
|
|
12693
12856
|
click
|
|
12694
|
-
} = { ...defaultProps$
|
|
12857
|
+
} = { ...defaultProps$u, ...props };
|
|
12695
12858
|
const wrap = useRef(null);
|
|
12696
12859
|
const content = useRef(null);
|
|
12697
12860
|
const [showNoticeBar, SetShowNoticeBar] = useState(true);
|
|
@@ -12766,7 +12929,7 @@ const NoticeBar = (props) => {
|
|
|
12766
12929
|
}
|
|
12767
12930
|
});
|
|
12768
12931
|
};
|
|
12769
|
-
const
|
|
12932
|
+
const handleClick2 = (event) => {
|
|
12770
12933
|
click && click(event);
|
|
12771
12934
|
};
|
|
12772
12935
|
const onClickIcon = (event) => {
|
|
@@ -12851,7 +13014,7 @@ const NoticeBar = (props) => {
|
|
|
12851
13014
|
}, showNoticeBar && direction == "across" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12852
13015
|
className: noticebarClass,
|
|
12853
13016
|
style: barStyle,
|
|
12854
|
-
onClick:
|
|
13017
|
+
onClick: handleClick2
|
|
12855
13018
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12856
13019
|
className: "left-icon",
|
|
12857
13020
|
style: { backgroundImage: `url(${leftIcon || ""})` }
|
|
@@ -12904,16 +13067,16 @@ const NoticeBar = (props) => {
|
|
|
12904
13067
|
size: "11px"
|
|
12905
13068
|
}) : null))) : null);
|
|
12906
13069
|
};
|
|
12907
|
-
NoticeBar.defaultProps = defaultProps$
|
|
13070
|
+
NoticeBar.defaultProps = defaultProps$u;
|
|
12908
13071
|
NoticeBar.displayName = "NutNoticeBar";
|
|
12909
13072
|
const DataContext$1 = createContext({});
|
|
12910
|
-
const defaultProps$
|
|
13073
|
+
const defaultProps$t = {
|
|
12911
13074
|
current: 0,
|
|
12912
13075
|
direction: "horizontal",
|
|
12913
13076
|
progressDot: false
|
|
12914
13077
|
};
|
|
12915
13078
|
const Steps = (props) => {
|
|
12916
|
-
const propSteps = { ...defaultProps$
|
|
13079
|
+
const propSteps = { ...defaultProps$t, ...props };
|
|
12917
13080
|
const {
|
|
12918
13081
|
children,
|
|
12919
13082
|
current,
|
|
@@ -12938,9 +13101,9 @@ const Steps = (props) => {
|
|
|
12938
13101
|
...restProps
|
|
12939
13102
|
}, children));
|
|
12940
13103
|
};
|
|
12941
|
-
Steps.defaultProps = defaultProps$
|
|
13104
|
+
Steps.defaultProps = defaultProps$t;
|
|
12942
13105
|
Steps.displayName = "NutSteps";
|
|
12943
|
-
const defaultProps$
|
|
13106
|
+
const defaultProps$s = {
|
|
12944
13107
|
title: "",
|
|
12945
13108
|
content: "",
|
|
12946
13109
|
activeIndex: 0,
|
|
@@ -12961,7 +13124,7 @@ const Step = (props) => {
|
|
|
12961
13124
|
renderContent,
|
|
12962
13125
|
...restProps
|
|
12963
13126
|
} = {
|
|
12964
|
-
...defaultProps$
|
|
13127
|
+
...defaultProps$s,
|
|
12965
13128
|
...props
|
|
12966
13129
|
};
|
|
12967
13130
|
const parent = useContext$1(DataContext$1);
|
|
@@ -13018,10 +13181,10 @@ const Step = (props) => {
|
|
|
13018
13181
|
className: "nut-step-content"
|
|
13019
13182
|
}, renderContent())));
|
|
13020
13183
|
};
|
|
13021
|
-
Step.defaultProps = defaultProps$
|
|
13184
|
+
Step.defaultProps = defaultProps$s;
|
|
13022
13185
|
Step.displayName = "NutStep";
|
|
13023
13186
|
const DataContext = createContext({});
|
|
13024
|
-
const defaultProps$
|
|
13187
|
+
const defaultProps$r = {
|
|
13025
13188
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
13026
13189
|
height: 0,
|
|
13027
13190
|
duration: 500,
|
|
@@ -13034,11 +13197,12 @@ const defaultProps$q = {
|
|
|
13034
13197
|
touchable: true,
|
|
13035
13198
|
isPreventDefault: true,
|
|
13036
13199
|
isStopPropagation: true,
|
|
13200
|
+
isCenter: false,
|
|
13037
13201
|
className: ""
|
|
13038
13202
|
};
|
|
13039
13203
|
const DISTANCE = 5;
|
|
13040
13204
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
13041
|
-
const propSwiper = { ...defaultProps$
|
|
13205
|
+
const propSwiper = { ...defaultProps$r, ...props };
|
|
13042
13206
|
const {
|
|
13043
13207
|
children,
|
|
13044
13208
|
direction,
|
|
@@ -13052,6 +13216,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13052
13216
|
isPreventDefault,
|
|
13053
13217
|
isStopPropagation,
|
|
13054
13218
|
autoPlay,
|
|
13219
|
+
isCenter,
|
|
13055
13220
|
...rest
|
|
13056
13221
|
} = propSwiper;
|
|
13057
13222
|
const container = useRef(null);
|
|
@@ -13201,7 +13366,6 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13201
13366
|
props.onChange && props.onChange((targetActive + childCount) % childCount);
|
|
13202
13367
|
}
|
|
13203
13368
|
active = targetActive;
|
|
13204
|
-
offset2 = targetOffset;
|
|
13205
13369
|
setActive(targetActive);
|
|
13206
13370
|
setOffset(targetOffset);
|
|
13207
13371
|
getStyle(targetOffset);
|
|
@@ -13274,7 +13438,15 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13274
13438
|
});
|
|
13275
13439
|
const getStyle = (moveOffset = offset) => {
|
|
13276
13440
|
const target = innerRef.current;
|
|
13277
|
-
|
|
13441
|
+
let _offset = 0;
|
|
13442
|
+
if (!isCenter) {
|
|
13443
|
+
_offset = moveOffset;
|
|
13444
|
+
} else {
|
|
13445
|
+
const _size = isVertical ? height : width;
|
|
13446
|
+
const val = isVertical ? rect.height - _size : rect.width - _size;
|
|
13447
|
+
_offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
|
|
13448
|
+
}
|
|
13449
|
+
target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
|
|
13278
13450
|
target.style.transitionDuration = `${_swiper.current.moving ? 0 : props.duration}ms`;
|
|
13279
13451
|
target.style[isVertical ? "height" : "width"] = `${Number(size) * childCount}px`;
|
|
13280
13452
|
target.style[isVertical ? "width" : "height"] = `${isVertical ? width : height}px`;
|
|
@@ -13311,7 +13483,11 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13311
13483
|
if (isShouldMove && touch.stateDirection === props.direction) {
|
|
13312
13484
|
const offset2 = isVertical ? touch.offsetY : touch.offsetX;
|
|
13313
13485
|
if (props.loop) {
|
|
13314
|
-
|
|
13486
|
+
if (offset2 > 0) {
|
|
13487
|
+
pace = touch.delta > 0 ? -1 : 1;
|
|
13488
|
+
} else {
|
|
13489
|
+
pace = 0;
|
|
13490
|
+
}
|
|
13315
13491
|
} else {
|
|
13316
13492
|
pace = -Math[touch.delta > 0 ? "ceil" : "floor"](touch.delta / size);
|
|
13317
13493
|
}
|
|
@@ -13380,18 +13556,23 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13380
13556
|
target.removeEventListener("touchend", onTouchEnd, false);
|
|
13381
13557
|
};
|
|
13382
13558
|
});
|
|
13383
|
-
|
|
13384
|
-
|
|
13559
|
+
useEffect(() => {
|
|
13560
|
+
return () => {
|
|
13561
|
+
stopAutoPlay();
|
|
13562
|
+
};
|
|
13563
|
+
}, []);
|
|
13564
|
+
const itemStyle = (index2) => {
|
|
13565
|
+
const style = {};
|
|
13385
13566
|
const _direction = propSwiper.direction || direction;
|
|
13386
13567
|
const _size = size;
|
|
13387
13568
|
if (_size) {
|
|
13388
|
-
|
|
13569
|
+
style[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
|
|
13389
13570
|
}
|
|
13390
13571
|
const offset2 = childOffset[index2];
|
|
13391
13572
|
if (offset2) {
|
|
13392
|
-
|
|
13573
|
+
style.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
|
|
13393
13574
|
}
|
|
13394
|
-
return
|
|
13575
|
+
return style;
|
|
13395
13576
|
};
|
|
13396
13577
|
React__default.useImperativeHandle(ref, () => ({
|
|
13397
13578
|
to: to2,
|
|
@@ -13410,7 +13591,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13410
13591
|
}, React__default.Children.map(childs, (child, index2) => {
|
|
13411
13592
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13412
13593
|
className: b2("item-wrapper"),
|
|
13413
|
-
style:
|
|
13594
|
+
style: itemStyle(index2),
|
|
13414
13595
|
key: index2
|
|
13415
13596
|
}, child);
|
|
13416
13597
|
})), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -13420,30 +13601,28 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13420
13601
|
})
|
|
13421
13602
|
}, React__default.Children.map(childs, (item, index2) => {
|
|
13422
13603
|
return /* @__PURE__ */ React__default.createElement("i", {
|
|
13423
|
-
style: {
|
|
13424
|
-
backgroundColor:
|
|
13425
|
-
},
|
|
13604
|
+
style: (active + childCount) % childCount === index2 ? {
|
|
13605
|
+
backgroundColor: propSwiper.paginationColor
|
|
13606
|
+
} : void 0,
|
|
13607
|
+
className: classNames({
|
|
13608
|
+
[`${b2("pagination-item")}`]: true,
|
|
13609
|
+
active: (active + childCount) % childCount === index2
|
|
13610
|
+
}),
|
|
13426
13611
|
key: index2
|
|
13427
13612
|
});
|
|
13428
13613
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
13429
13614
|
});
|
|
13430
|
-
Swiper.defaultProps = defaultProps$
|
|
13615
|
+
Swiper.defaultProps = defaultProps$r;
|
|
13431
13616
|
Swiper.displayName = "NutSwiper";
|
|
13432
|
-
const defaultProps$
|
|
13617
|
+
const defaultProps$q = {
|
|
13433
13618
|
direction: "horizontal"
|
|
13434
13619
|
};
|
|
13435
13620
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
13436
|
-
const _props = { ...defaultProps$
|
|
13621
|
+
const _props = { ...defaultProps$q, ...props };
|
|
13437
13622
|
const { children, direction, size } = _props;
|
|
13438
13623
|
const parent = useContext$1(DataContext);
|
|
13439
|
-
const [offset, setOffset] = useState(0);
|
|
13440
13624
|
const b2 = cn("swiper-item");
|
|
13441
13625
|
const classes = classNames(b2(""));
|
|
13442
|
-
useImperativeHandle(ref, () => ({
|
|
13443
|
-
changeOffset: (num) => {
|
|
13444
|
-
setOffset(num);
|
|
13445
|
-
}
|
|
13446
|
-
}));
|
|
13447
13626
|
const style = () => {
|
|
13448
13627
|
const style2 = {};
|
|
13449
13628
|
const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
|
|
@@ -13458,10 +13637,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
13458
13637
|
style: style()
|
|
13459
13638
|
}, children);
|
|
13460
13639
|
});
|
|
13461
|
-
SwiperItem.defaultProps = defaultProps$
|
|
13640
|
+
SwiperItem.defaultProps = defaultProps$q;
|
|
13462
13641
|
SwiperItem.displayName = "NutSwiperItem";
|
|
13463
13642
|
const AvatarContext = createContext({});
|
|
13464
|
-
const defaultProps$
|
|
13643
|
+
const defaultProps$p = {
|
|
13465
13644
|
size: "",
|
|
13466
13645
|
icon: "",
|
|
13467
13646
|
bgColor: "#eee",
|
|
@@ -13488,7 +13667,7 @@ const Avatar = (props) => {
|
|
|
13488
13667
|
onError,
|
|
13489
13668
|
...rest
|
|
13490
13669
|
} = {
|
|
13491
|
-
...defaultProps$
|
|
13670
|
+
...defaultProps$p,
|
|
13492
13671
|
...props
|
|
13493
13672
|
};
|
|
13494
13673
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -13568,9 +13747,9 @@ const Avatar = (props) => {
|
|
|
13568
13747
|
className: "text"
|
|
13569
13748
|
}, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxCount)}`)));
|
|
13570
13749
|
};
|
|
13571
|
-
Avatar.defaultProps = defaultProps$
|
|
13750
|
+
Avatar.defaultProps = defaultProps$p;
|
|
13572
13751
|
Avatar.displayName = "NutAvatar";
|
|
13573
|
-
const defaultProps$
|
|
13752
|
+
const defaultProps$o = {
|
|
13574
13753
|
maxContent: "",
|
|
13575
13754
|
maxCount: "",
|
|
13576
13755
|
maxBgColor: "#eee",
|
|
@@ -13582,7 +13761,7 @@ const defaultProps$n = {
|
|
|
13582
13761
|
};
|
|
13583
13762
|
const AvatarGroup = (props) => {
|
|
13584
13763
|
useConfig();
|
|
13585
|
-
const propAvatarGroup = { ...defaultProps$
|
|
13764
|
+
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
13586
13765
|
const { className, style, children } = propAvatarGroup;
|
|
13587
13766
|
const avatarGroupRef = useRef(null);
|
|
13588
13767
|
const b2 = cn("avatar-group");
|
|
@@ -13599,9 +13778,9 @@ const AvatarGroup = (props) => {
|
|
|
13599
13778
|
ref: avatarGroupRef
|
|
13600
13779
|
}, children));
|
|
13601
13780
|
};
|
|
13602
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
13781
|
+
AvatarGroup.defaultProps = defaultProps$o;
|
|
13603
13782
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
13604
|
-
const defaultProps$
|
|
13783
|
+
const defaultProps$n = {
|
|
13605
13784
|
price: 0,
|
|
13606
13785
|
needSymbol: true,
|
|
13607
13786
|
symbol: "¥",
|
|
@@ -13619,7 +13798,7 @@ const Price = (props) => {
|
|
|
13619
13798
|
className,
|
|
13620
13799
|
...rest
|
|
13621
13800
|
} = {
|
|
13622
|
-
...defaultProps$
|
|
13801
|
+
...defaultProps$n,
|
|
13623
13802
|
...props
|
|
13624
13803
|
};
|
|
13625
13804
|
const b2 = cn("price");
|
|
@@ -13672,9 +13851,9 @@ const Price = (props) => {
|
|
|
13672
13851
|
className: `${b2("small")}`
|
|
13673
13852
|
}, formatDecimal(price)));
|
|
13674
13853
|
};
|
|
13675
|
-
Price.defaultProps = defaultProps$
|
|
13854
|
+
Price.defaultProps = defaultProps$n;
|
|
13676
13855
|
Price.displayName = "NutPrice";
|
|
13677
|
-
const defaultProps$
|
|
13856
|
+
const defaultProps$m = {
|
|
13678
13857
|
value: "",
|
|
13679
13858
|
dot: false,
|
|
13680
13859
|
max: 1e4,
|
|
@@ -13686,19 +13865,19 @@ const defaultProps$l = {
|
|
|
13686
13865
|
};
|
|
13687
13866
|
const Badge = (props) => {
|
|
13688
13867
|
const { children, dot, top, right, zIndex, color, icons } = {
|
|
13689
|
-
...defaultProps$
|
|
13868
|
+
...defaultProps$m,
|
|
13690
13869
|
...props
|
|
13691
13870
|
};
|
|
13692
|
-
|
|
13871
|
+
function content() {
|
|
13693
13872
|
if (dot)
|
|
13694
|
-
return;
|
|
13873
|
+
return void 0;
|
|
13695
13874
|
const { value } = props;
|
|
13696
13875
|
const { max } = props;
|
|
13697
13876
|
if (typeof value === "number" && typeof max === "number") {
|
|
13698
13877
|
return max < value ? `${max}+` : value;
|
|
13699
13878
|
}
|
|
13700
13879
|
return value;
|
|
13701
|
-
}
|
|
13880
|
+
}
|
|
13702
13881
|
const getStyle = () => {
|
|
13703
13882
|
const style = {};
|
|
13704
13883
|
style.top = `${top}px`;
|
|
@@ -13709,7 +13888,7 @@ const Badge = (props) => {
|
|
|
13709
13888
|
};
|
|
13710
13889
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13711
13890
|
className: "nut-badge"
|
|
13712
|
-
}, icons
|
|
13891
|
+
}, icons !== "" && /* @__PURE__ */ React__default.createElement("div", {
|
|
13713
13892
|
className: "slot-icons"
|
|
13714
13893
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13715
13894
|
className: "_icon",
|
|
@@ -13721,9 +13900,9 @@ const Badge = (props) => {
|
|
|
13721
13900
|
style: getStyle()
|
|
13722
13901
|
}, content()));
|
|
13723
13902
|
};
|
|
13724
|
-
Badge.defaultProps = defaultProps$
|
|
13903
|
+
Badge.defaultProps = defaultProps$m;
|
|
13725
13904
|
Badge.displayName = "NutBadge";
|
|
13726
|
-
const defaultProps$
|
|
13905
|
+
const defaultProps$l = {
|
|
13727
13906
|
type: "default",
|
|
13728
13907
|
color: "",
|
|
13729
13908
|
textColor: "",
|
|
@@ -13751,7 +13930,7 @@ const Tag = (props) => {
|
|
|
13751
13930
|
onClick,
|
|
13752
13931
|
onClose
|
|
13753
13932
|
} = {
|
|
13754
|
-
...defaultProps$
|
|
13933
|
+
...defaultProps$l,
|
|
13755
13934
|
...props
|
|
13756
13935
|
};
|
|
13757
13936
|
const [btnName, setBtnName] = useState("");
|
|
@@ -13779,7 +13958,7 @@ const Tag = (props) => {
|
|
|
13779
13958
|
${mark ? `${prefixCls2}--mark` : ""}
|
|
13780
13959
|
${closeable ? `${prefixCls2}--close` : ""}`;
|
|
13781
13960
|
};
|
|
13782
|
-
const
|
|
13961
|
+
const handleClick2 = (e2) => {
|
|
13783
13962
|
if (props.onClick) {
|
|
13784
13963
|
props.onClick(e2);
|
|
13785
13964
|
}
|
|
@@ -13802,7 +13981,7 @@ const Tag = (props) => {
|
|
|
13802
13981
|
return /* @__PURE__ */ React__default.createElement("div", null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
|
|
13803
13982
|
className: `${btnName}`,
|
|
13804
13983
|
style: getStyle(),
|
|
13805
|
-
onClick: (e2) =>
|
|
13984
|
+
onClick: (e2) => handleClick2(e2)
|
|
13806
13985
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
13807
13986
|
className: "text"
|
|
13808
13987
|
}, children), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
@@ -13818,12 +13997,12 @@ const Tag = (props) => {
|
|
|
13818
13997
|
})) : /* @__PURE__ */ React__default.createElement("div", {
|
|
13819
13998
|
className: `${btnName}`,
|
|
13820
13999
|
style: getStyle(),
|
|
13821
|
-
onClick: (e2) =>
|
|
14000
|
+
onClick: (e2) => handleClick2(e2)
|
|
13822
14001
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
13823
14002
|
className: "text"
|
|
13824
14003
|
}, children)));
|
|
13825
14004
|
};
|
|
13826
|
-
Tag.defaultProps = defaultProps$
|
|
14005
|
+
Tag.defaultProps = defaultProps$l;
|
|
13827
14006
|
Tag.displayName = "NutTag";
|
|
13828
14007
|
function fillRef(ref, node) {
|
|
13829
14008
|
if (typeof ref === "function") {
|
|
@@ -13840,9 +14019,6 @@ function composeRef(...refs) {
|
|
|
13840
14019
|
};
|
|
13841
14020
|
}
|
|
13842
14021
|
class Trigger extends React__default.Component {
|
|
13843
|
-
constructor(props) {
|
|
13844
|
-
super(props);
|
|
13845
|
-
}
|
|
13846
14022
|
fireEvents(type, e2) {
|
|
13847
14023
|
const childCallback = this.props.children.props[type];
|
|
13848
14024
|
if (childCallback) {
|
|
@@ -13882,7 +14058,7 @@ const getEleAttr = (ele) => {
|
|
|
13882
14058
|
}
|
|
13883
14059
|
return null;
|
|
13884
14060
|
};
|
|
13885
|
-
const defaultProps$
|
|
14061
|
+
const defaultProps$k = {
|
|
13886
14062
|
list: [],
|
|
13887
14063
|
theme: "light",
|
|
13888
14064
|
location: "bottom",
|
|
@@ -13903,7 +14079,7 @@ const Popover = (props) => {
|
|
|
13903
14079
|
onClick,
|
|
13904
14080
|
...reset
|
|
13905
14081
|
} = {
|
|
13906
|
-
...defaultProps$
|
|
14082
|
+
...defaultProps$k,
|
|
13907
14083
|
...props
|
|
13908
14084
|
};
|
|
13909
14085
|
const goodItem = useRef(null);
|
|
@@ -13920,19 +14096,19 @@ const Popover = (props) => {
|
|
|
13920
14096
|
const [popoverContent, setPopoverContent] = useState("");
|
|
13921
14097
|
const [popoverArrow, setPopoverArrow] = useState("");
|
|
13922
14098
|
useEffect(() => {
|
|
13923
|
-
setClasses(
|
|
13924
|
-
setPopoverContent(
|
|
13925
|
-
setPopoverArrow(
|
|
14099
|
+
setClasses(classesSelf());
|
|
14100
|
+
setPopoverContent(popoverContentSelf());
|
|
14101
|
+
setPopoverArrow(popoverArrowSelf());
|
|
13926
14102
|
}, [list, theme]);
|
|
13927
14103
|
const getStyle = () => {
|
|
13928
14104
|
const style2 = {};
|
|
13929
|
-
if (location
|
|
14105
|
+
if (location === "top") {
|
|
13930
14106
|
style2.bottom = elHeight + 20;
|
|
13931
14107
|
style2.left = 0;
|
|
13932
|
-
} else if (location
|
|
14108
|
+
} else if (location === "right") {
|
|
13933
14109
|
style2.top = 0;
|
|
13934
14110
|
style2.right = -elWidth - 20;
|
|
13935
|
-
} else if (location
|
|
14111
|
+
} else if (location === "left") {
|
|
13936
14112
|
style2.top = 0;
|
|
13937
14113
|
style2.left = -elWidth - 20;
|
|
13938
14114
|
} else {
|
|
@@ -13947,13 +14123,13 @@ const Popover = (props) => {
|
|
|
13947
14123
|
};
|
|
13948
14124
|
const getArrowStyle = () => {
|
|
13949
14125
|
const style2 = {};
|
|
13950
|
-
if (location
|
|
14126
|
+
if (location === "top") {
|
|
13951
14127
|
style2.bottom = -20;
|
|
13952
14128
|
style2.left = elWidth / 2;
|
|
13953
|
-
} else if (location
|
|
14129
|
+
} else if (location === "right") {
|
|
13954
14130
|
style2.top = 20;
|
|
13955
14131
|
style2.left = -20;
|
|
13956
|
-
} else if (location
|
|
14132
|
+
} else if (location === "left") {
|
|
13957
14133
|
style2.top = 20;
|
|
13958
14134
|
style2.right = -20;
|
|
13959
14135
|
} else {
|
|
@@ -13966,22 +14142,22 @@ const Popover = (props) => {
|
|
|
13966
14142
|
style2.right += "px";
|
|
13967
14143
|
return style2;
|
|
13968
14144
|
};
|
|
13969
|
-
const
|
|
14145
|
+
const classesSelf = () => {
|
|
13970
14146
|
const prefixCls = "nut-popover";
|
|
13971
14147
|
return `${prefixCls}
|
|
13972
14148
|
${theme ? `${prefixCls}--${theme}` : ""}`;
|
|
13973
14149
|
};
|
|
13974
|
-
const
|
|
14150
|
+
const popoverContentSelf = () => {
|
|
13975
14151
|
const prefixCls = "popoverContent";
|
|
13976
14152
|
return `${prefixCls}
|
|
13977
14153
|
${location ? `${prefixCls}--${location}` : ""}`;
|
|
13978
14154
|
};
|
|
13979
|
-
const
|
|
14155
|
+
const popoverArrowSelf = () => {
|
|
13980
14156
|
const prefixCls = "popoverArrow";
|
|
13981
14157
|
return `${prefixCls}
|
|
13982
14158
|
${location ? `${prefixCls}--${location}` : ""}`;
|
|
13983
14159
|
};
|
|
13984
|
-
const
|
|
14160
|
+
const handleClick2 = (e2) => {
|
|
13985
14161
|
if (props.onClick) {
|
|
13986
14162
|
props.onClick(e2);
|
|
13987
14163
|
}
|
|
@@ -13993,7 +14169,7 @@ const Popover = (props) => {
|
|
|
13993
14169
|
}, /* @__PURE__ */ React__default.createElement(Trigger, {
|
|
13994
14170
|
forwardedRef: goodItem
|
|
13995
14171
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
13996
|
-
onClick: (e2) =>
|
|
14172
|
+
onClick: (e2) => handleClick2(e2)
|
|
13997
14173
|
}, Array.isArray(children) ? children[0] : children, visible ? /* @__PURE__ */ React__default.createElement("div", {
|
|
13998
14174
|
className: `${popoverContent}`,
|
|
13999
14175
|
style: getStyle()
|
|
@@ -14012,9 +14188,9 @@ const Popover = (props) => {
|
|
|
14012
14188
|
}, item.name));
|
|
14013
14189
|
})) : null)));
|
|
14014
14190
|
};
|
|
14015
|
-
Popover.defaultProps = defaultProps$
|
|
14191
|
+
Popover.defaultProps = defaultProps$k;
|
|
14016
14192
|
Popover.displayName = "NutPopover";
|
|
14017
|
-
const defaultProps$
|
|
14193
|
+
const defaultProps$j = {
|
|
14018
14194
|
width: "100px",
|
|
14019
14195
|
height: "100px",
|
|
14020
14196
|
row: 1,
|
|
@@ -14042,7 +14218,7 @@ const Skeleton = (props) => {
|
|
|
14042
14218
|
avatarShape,
|
|
14043
14219
|
...restProps
|
|
14044
14220
|
} = {
|
|
14045
|
-
...defaultProps$
|
|
14221
|
+
...defaultProps$j,
|
|
14046
14222
|
...props
|
|
14047
14223
|
};
|
|
14048
14224
|
const b2 = cn("skeleton");
|
|
@@ -14097,9 +14273,9 @@ const Skeleton = (props) => {
|
|
|
14097
14273
|
});
|
|
14098
14274
|
})))));
|
|
14099
14275
|
};
|
|
14100
|
-
Skeleton.defaultProps = defaultProps$
|
|
14276
|
+
Skeleton.defaultProps = defaultProps$j;
|
|
14101
14277
|
Skeleton.displayName = "NutSkeleton";
|
|
14102
|
-
const defaultProps$
|
|
14278
|
+
const defaultProps$i = {
|
|
14103
14279
|
showPlainText: false,
|
|
14104
14280
|
showDays: false,
|
|
14105
14281
|
paused: false,
|
|
@@ -14122,7 +14298,7 @@ const CountDown = (props) => {
|
|
|
14122
14298
|
onUpdate,
|
|
14123
14299
|
children,
|
|
14124
14300
|
...rest
|
|
14125
|
-
} = { ...defaultProps$
|
|
14301
|
+
} = { ...defaultProps$i, ...props };
|
|
14126
14302
|
const b2 = cn("countdown");
|
|
14127
14303
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
14128
14304
|
const stateRef = useRef({
|
|
@@ -14269,9 +14445,9 @@ const CountDown = (props) => {
|
|
|
14269
14445
|
className: b2("block")
|
|
14270
14446
|
}, resttime.s))));
|
|
14271
14447
|
};
|
|
14272
|
-
CountDown.defaultProps = defaultProps$
|
|
14448
|
+
CountDown.defaultProps = defaultProps$i;
|
|
14273
14449
|
CountDown.displayName = "NutCountDown";
|
|
14274
|
-
const defaultProps$
|
|
14450
|
+
const defaultProps$h = {
|
|
14275
14451
|
activeName: ["0"],
|
|
14276
14452
|
accordion: false,
|
|
14277
14453
|
icon: "",
|
|
@@ -14293,7 +14469,7 @@ const Collapse = memo((props) => {
|
|
|
14293
14469
|
iconColor,
|
|
14294
14470
|
change
|
|
14295
14471
|
} = {
|
|
14296
|
-
...defaultProps$
|
|
14472
|
+
...defaultProps$h,
|
|
14297
14473
|
...props
|
|
14298
14474
|
};
|
|
14299
14475
|
const childrenDom = React__default.Children.toArray(children);
|
|
@@ -14348,9 +14524,9 @@ const Collapse = memo((props) => {
|
|
|
14348
14524
|
});
|
|
14349
14525
|
}));
|
|
14350
14526
|
}, areEqual);
|
|
14351
|
-
Collapse.defaultProps = defaultProps$
|
|
14527
|
+
Collapse.defaultProps = defaultProps$h;
|
|
14352
14528
|
Collapse.displayName = "NutCollapse";
|
|
14353
|
-
const defaultProps$
|
|
14529
|
+
const defaultProps$g = {
|
|
14354
14530
|
title: "",
|
|
14355
14531
|
name: "",
|
|
14356
14532
|
isOpen: false,
|
|
@@ -14384,7 +14560,7 @@ const CollapseItem = (props) => {
|
|
|
14384
14560
|
iconColor,
|
|
14385
14561
|
...rest
|
|
14386
14562
|
} = {
|
|
14387
|
-
...defaultProps$
|
|
14563
|
+
...defaultProps$g,
|
|
14388
14564
|
...props
|
|
14389
14565
|
};
|
|
14390
14566
|
const [domHeight, setDomHeight] = useState(-1);
|
|
@@ -14422,13 +14598,13 @@ const CollapseItem = (props) => {
|
|
|
14422
14598
|
}
|
|
14423
14599
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
14424
14600
|
className: colBem("title")
|
|
14425
|
-
}, titleIcon && titleIconPosition
|
|
14601
|
+
}, titleIcon && titleIconPosition === "left" && /* @__PURE__ */ React__default.createElement("b", {
|
|
14426
14602
|
className: colBem("title-icon-left")
|
|
14427
14603
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14428
14604
|
name: titleIcon,
|
|
14429
14605
|
size: titleIconSize,
|
|
14430
14606
|
color: disabled ? "#C2C2C2" : titleIconColor
|
|
14431
|
-
})), title, titleIcon && titleIconPosition
|
|
14607
|
+
})), title, titleIcon && titleIconPosition === "right" && /* @__PURE__ */ React__default.createElement("b", {
|
|
14432
14608
|
className: colBem("title-icon-right")
|
|
14433
14609
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14434
14610
|
name: titleIcon,
|
|
@@ -14453,9 +14629,9 @@ const CollapseItem = (props) => {
|
|
|
14453
14629
|
className: colBem("content-text")
|
|
14454
14630
|
}, children)));
|
|
14455
14631
|
};
|
|
14456
|
-
CollapseItem.defaultProps = defaultProps$
|
|
14632
|
+
CollapseItem.defaultProps = defaultProps$g;
|
|
14457
14633
|
CollapseItem.displayName = "NutCollapseItem";
|
|
14458
|
-
const defaultProps$
|
|
14634
|
+
const defaultProps$f = {
|
|
14459
14635
|
maxLen: 0,
|
|
14460
14636
|
endNumber: "",
|
|
14461
14637
|
delaySpeed: 300,
|
|
@@ -14473,7 +14649,7 @@ const CountUp = (props) => {
|
|
|
14473
14649
|
thousands,
|
|
14474
14650
|
...reset
|
|
14475
14651
|
} = {
|
|
14476
|
-
...defaultProps$
|
|
14652
|
+
...defaultProps$f,
|
|
14477
14653
|
...props
|
|
14478
14654
|
};
|
|
14479
14655
|
const b2 = cn("countup");
|
|
@@ -14539,9 +14715,9 @@ const CountUp = (props) => {
|
|
|
14539
14715
|
}, item));
|
|
14540
14716
|
})));
|
|
14541
14717
|
};
|
|
14542
|
-
CountUp.defaultProps = defaultProps$
|
|
14718
|
+
CountUp.defaultProps = defaultProps$f;
|
|
14543
14719
|
CountUp.displayName = "NutCountUp";
|
|
14544
|
-
const defaultProps$
|
|
14720
|
+
const defaultProps$e = {};
|
|
14545
14721
|
class AnimatingNumbers extends Component {
|
|
14546
14722
|
constructor(props) {
|
|
14547
14723
|
super(props);
|
|
@@ -14553,7 +14729,7 @@ class AnimatingNumbers extends Component {
|
|
|
14553
14729
|
});
|
|
14554
14730
|
}
|
|
14555
14731
|
}
|
|
14556
|
-
AnimatingNumbers.defaultProps = defaultProps$
|
|
14732
|
+
AnimatingNumbers.defaultProps = defaultProps$e;
|
|
14557
14733
|
AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
14558
14734
|
AnimatingNumbers.CountUp = CountUp;
|
|
14559
14735
|
AnimatingNumbers.CountUp = CountUp;
|
|
@@ -14562,7 +14738,7 @@ const defaultStatus = {
|
|
|
14562
14738
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
14563
14739
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
14564
14740
|
};
|
|
14565
|
-
const defaultProps$
|
|
14741
|
+
const defaultProps$d = {
|
|
14566
14742
|
description: "\u65E0\u5185\u5BB9",
|
|
14567
14743
|
image: "empty",
|
|
14568
14744
|
imageSize: "",
|
|
@@ -14570,9 +14746,9 @@ const defaultProps$c = {
|
|
|
14570
14746
|
};
|
|
14571
14747
|
const Empty = (props) => {
|
|
14572
14748
|
const { locale } = useConfig();
|
|
14573
|
-
defaultProps$
|
|
14749
|
+
defaultProps$d.description = locale.noData || defaultProps$d.description;
|
|
14574
14750
|
const { image, imageSize, description, children, className, ...rest } = {
|
|
14575
|
-
...defaultProps$
|
|
14751
|
+
...defaultProps$d,
|
|
14576
14752
|
...props
|
|
14577
14753
|
};
|
|
14578
14754
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -14607,14 +14783,14 @@ const Empty = (props) => {
|
|
|
14607
14783
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
14608
14784
|
className: `${b2()} ${className}`,
|
|
14609
14785
|
...rest
|
|
14610
|
-
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
14786
|
+
}, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
14611
14787
|
className: b2("image"),
|
|
14612
14788
|
style: imgStyle
|
|
14613
14789
|
}, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
14614
14790
|
className: b2("description")
|
|
14615
|
-
}, description) : { description }, children);
|
|
14791
|
+
}, description) : { description }, children));
|
|
14616
14792
|
};
|
|
14617
|
-
Empty.defaultProps = defaultProps$
|
|
14793
|
+
Empty.defaultProps = defaultProps$d;
|
|
14618
14794
|
Empty.displayName = "NutEmpty";
|
|
14619
14795
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
14620
14796
|
let index2 = 0;
|
|
@@ -14727,7 +14903,7 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
14727
14903
|
}
|
|
14728
14904
|
});
|
|
14729
14905
|
};
|
|
14730
|
-
const defaultProps$
|
|
14906
|
+
const defaultProps$c = {};
|
|
14731
14907
|
const VirtualList = (props) => {
|
|
14732
14908
|
const {
|
|
14733
14909
|
sourceData = [],
|
|
@@ -14886,8 +15062,125 @@ const VirtualList = (props) => {
|
|
|
14886
15062
|
}) : data);
|
|
14887
15063
|
}))));
|
|
14888
15064
|
};
|
|
14889
|
-
VirtualList.defaultProps = defaultProps$
|
|
15065
|
+
VirtualList.defaultProps = defaultProps$c;
|
|
14890
15066
|
VirtualList.displayName = "NutVirtualList";
|
|
15067
|
+
const defaultProps$b = {
|
|
15068
|
+
className: "",
|
|
15069
|
+
style: {},
|
|
15070
|
+
columns: [],
|
|
15071
|
+
data: [],
|
|
15072
|
+
bordered: true,
|
|
15073
|
+
striped: false,
|
|
15074
|
+
noData: "\u65E0\u6570\u636E"
|
|
15075
|
+
};
|
|
15076
|
+
const Table = (props) => {
|
|
15077
|
+
const { locale } = useConfig();
|
|
15078
|
+
defaultProps$b.noData = locale.noData;
|
|
15079
|
+
const {
|
|
15080
|
+
children,
|
|
15081
|
+
className,
|
|
15082
|
+
style,
|
|
15083
|
+
columns,
|
|
15084
|
+
data,
|
|
15085
|
+
bordered,
|
|
15086
|
+
summary,
|
|
15087
|
+
striped,
|
|
15088
|
+
noData,
|
|
15089
|
+
onSorter,
|
|
15090
|
+
...rest
|
|
15091
|
+
} = {
|
|
15092
|
+
...defaultProps$b,
|
|
15093
|
+
...props
|
|
15094
|
+
};
|
|
15095
|
+
const [curData, setCurData] = useState(data);
|
|
15096
|
+
useEffect(() => {
|
|
15097
|
+
if (data && String(data) !== String(curData)) {
|
|
15098
|
+
setCurData(data);
|
|
15099
|
+
}
|
|
15100
|
+
}, [data]);
|
|
15101
|
+
const b2 = cn("table");
|
|
15102
|
+
const classes = classNames({});
|
|
15103
|
+
const cls = classNames(b2(), classes, className);
|
|
15104
|
+
const handleSorterClick = (item) => {
|
|
15105
|
+
if (item.sorter) {
|
|
15106
|
+
onSorter && onSorter(item, curData);
|
|
15107
|
+
if (typeof item.sorter === "function") {
|
|
15108
|
+
setCurData(curData.sort(item.sorter));
|
|
15109
|
+
} else {
|
|
15110
|
+
setCurData(item.sorter === "default" ? curData.sort() : curData);
|
|
15111
|
+
}
|
|
15112
|
+
}
|
|
15113
|
+
};
|
|
15114
|
+
const cellClasses = (item) => {
|
|
15115
|
+
return {
|
|
15116
|
+
"nut-table__main__head__tr--border": props.bordered,
|
|
15117
|
+
[`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
|
|
15118
|
+
};
|
|
15119
|
+
};
|
|
15120
|
+
const getColumnItem = (value) => {
|
|
15121
|
+
return columns.filter((item) => item.key === value)[0];
|
|
15122
|
+
};
|
|
15123
|
+
const renderHeadCells = () => {
|
|
15124
|
+
return columns.map((item, index2) => {
|
|
15125
|
+
return /* @__PURE__ */ React__default.createElement("span", {
|
|
15126
|
+
className: classNames("nut-table__main__head__tr__th", cellClasses(item)),
|
|
15127
|
+
key: item.key,
|
|
15128
|
+
onClick: () => handleSorterClick(item)
|
|
15129
|
+
}, item.title, item.sorter && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15130
|
+
name: "down-arrow",
|
|
15131
|
+
size: "12px"
|
|
15132
|
+
}));
|
|
15133
|
+
});
|
|
15134
|
+
};
|
|
15135
|
+
const sortDataItem = () => {
|
|
15136
|
+
return columns.map((columns2) => {
|
|
15137
|
+
return [columns2.key, columns2.render];
|
|
15138
|
+
});
|
|
15139
|
+
};
|
|
15140
|
+
const renderBodyTds = (item) => {
|
|
15141
|
+
return sortDataItem().map(([value, render], index2) => {
|
|
15142
|
+
return /* @__PURE__ */ React__default.createElement("span", {
|
|
15143
|
+
className: classNames("nut-table__main__body__tr__td", cellClasses(getColumnItem(value))),
|
|
15144
|
+
key: value
|
|
15145
|
+
}, typeof item[value] === "function" || typeof render === "function" ? /* @__PURE__ */ React__default.createElement("div", null, render ? render(item) : item[value](item)) : item[value]);
|
|
15146
|
+
});
|
|
15147
|
+
};
|
|
15148
|
+
const renderBoyTrs = () => {
|
|
15149
|
+
return curData.map((item, index2) => {
|
|
15150
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15151
|
+
className: "nut-table__main__body__tr",
|
|
15152
|
+
key: index2
|
|
15153
|
+
}, renderBodyTds(item));
|
|
15154
|
+
});
|
|
15155
|
+
};
|
|
15156
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15157
|
+
className: cls,
|
|
15158
|
+
style,
|
|
15159
|
+
...rest
|
|
15160
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15161
|
+
className: classNames("nut-table__main", {
|
|
15162
|
+
"nut-table__main--striped": striped
|
|
15163
|
+
})
|
|
15164
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15165
|
+
className: "nut-table__main__head"
|
|
15166
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15167
|
+
className: "nut-table__main__head__tr"
|
|
15168
|
+
}, renderHeadCells())), /* @__PURE__ */ React__default.createElement("div", {
|
|
15169
|
+
className: "nut-table__main__body"
|
|
15170
|
+
}, renderBoyTrs())), summary && /* @__PURE__ */ React__default.createElement("div", {
|
|
15171
|
+
className: "nut-table__summary"
|
|
15172
|
+
}, /* @__PURE__ */ React__default.createElement("span", {
|
|
15173
|
+
className: "nut-table__summary__text"
|
|
15174
|
+
}, summary)), curData.length === 0 && /* @__PURE__ */ React__default.createElement("div", {
|
|
15175
|
+
className: "nut-table__nodata"
|
|
15176
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15177
|
+
className: "nut-table__nodata"
|
|
15178
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15179
|
+
className: "nut-table__nodata__text"
|
|
15180
|
+
}, noData))));
|
|
15181
|
+
};
|
|
15182
|
+
Table.defaultProps = defaultProps$b;
|
|
15183
|
+
Table.displayName = "NutTable";
|
|
14891
15184
|
const defaultProps$a = {
|
|
14892
15185
|
source: {
|
|
14893
15186
|
type: {},
|
|
@@ -15146,7 +15439,8 @@ const ExistRender = (props) => {
|
|
|
15146
15439
|
}, existAddress.map((item, index2) => {
|
|
15147
15440
|
return /* @__PURE__ */ React__default.createElement("li", {
|
|
15148
15441
|
className: b2("exist-item"),
|
|
15149
|
-
key: index2
|
|
15442
|
+
key: index2
|
|
15443
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15150
15444
|
onClick: () => selectedExist(item)
|
|
15151
15445
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15152
15446
|
className: b2("exist-item-icon"),
|
|
@@ -15163,7 +15457,7 @@ const ExistRender = (props) => {
|
|
|
15163
15457
|
className: "exist-item-info-phone"
|
|
15164
15458
|
}, item.phone)), /* @__PURE__ */ React__default.createElement("div", {
|
|
15165
15459
|
className: "exist-item-info-bottom"
|
|
15166
|
-
}, /* @__PURE__ */ React__default.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail))));
|
|
15460
|
+
}, /* @__PURE__ */ React__default.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
|
|
15167
15461
|
}))), isShowCustomAddress && /* @__PURE__ */ React__default.createElement("div", {
|
|
15168
15462
|
className: b2("choose-other"),
|
|
15169
15463
|
onClick: switchModule
|
|
@@ -15172,6 +15466,7 @@ const ExistRender = (props) => {
|
|
|
15172
15466
|
}, locale.address.chooseAnotherAddress || customAndExistTitle)));
|
|
15173
15467
|
};
|
|
15174
15468
|
const defaultProps$7 = {
|
|
15469
|
+
modelValue: [],
|
|
15175
15470
|
type: "custom",
|
|
15176
15471
|
province: [],
|
|
15177
15472
|
city: [],
|
|
@@ -15184,6 +15479,7 @@ const CustomRender = (props) => {
|
|
|
15184
15479
|
const {
|
|
15185
15480
|
children,
|
|
15186
15481
|
type,
|
|
15482
|
+
modelValue,
|
|
15187
15483
|
height,
|
|
15188
15484
|
province,
|
|
15189
15485
|
city,
|
|
@@ -15246,9 +15542,7 @@ const CustomRender = (props) => {
|
|
|
15246
15542
|
town: isCustom2() ? transformData(town) : town
|
|
15247
15543
|
});
|
|
15248
15544
|
const [selectedRegion, setSelectedRegion] = useState({
|
|
15249
|
-
province: {
|
|
15250
|
-
name: ""
|
|
15251
|
-
},
|
|
15545
|
+
province: { name: "" },
|
|
15252
15546
|
city: { name: "" },
|
|
15253
15547
|
country: { name: "" },
|
|
15254
15548
|
town: { name: "" }
|
|
@@ -15280,26 +15574,28 @@ const CustomRender = (props) => {
|
|
|
15280
15574
|
const calBack = {
|
|
15281
15575
|
next: "",
|
|
15282
15576
|
value: "",
|
|
15283
|
-
custom: tabName[tabIndex]
|
|
15284
|
-
selectedRegion: {}
|
|
15577
|
+
custom: tabName[tabIndex]
|
|
15285
15578
|
};
|
|
15286
|
-
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15290
|
-
|
|
15291
|
-
|
|
15292
|
-
[tabName[tabIndex]]: item
|
|
15293
|
-
};
|
|
15294
|
-
for (let i = tabIndex; i < tabIndex - 1; i++) {
|
|
15295
|
-
setSelectedRegion(() => ({
|
|
15296
|
-
...selectedRegion,
|
|
15297
|
-
[tabName[i + 1]]: {}
|
|
15298
|
-
}));
|
|
15579
|
+
const bbselectedRegion = selectedRegion ? { ...selectedRegion } : null;
|
|
15580
|
+
if (bbselectedRegion) {
|
|
15581
|
+
setSelectedRegion({
|
|
15582
|
+
...bbselectedRegion,
|
|
15583
|
+
[tabName[tabIndex]]: item
|
|
15584
|
+
});
|
|
15299
15585
|
calBack.selectedRegion = {
|
|
15300
|
-
...
|
|
15301
|
-
[tabName[
|
|
15586
|
+
...bbselectedRegion,
|
|
15587
|
+
[tabName[tabIndex]]: item
|
|
15302
15588
|
};
|
|
15589
|
+
for (let i = tabIndex; i < tabIndex - 1; i++) {
|
|
15590
|
+
setSelectedRegion({
|
|
15591
|
+
...bbselectedRegion,
|
|
15592
|
+
[tabName[i + 1]]: null
|
|
15593
|
+
});
|
|
15594
|
+
calBack.selectedRegion = {
|
|
15595
|
+
...bbselectedRegion,
|
|
15596
|
+
[tabName[i + 1]]: {}
|
|
15597
|
+
};
|
|
15598
|
+
}
|
|
15303
15599
|
}
|
|
15304
15600
|
if (tabIndex < 4) {
|
|
15305
15601
|
if (tabIndex === 3) {
|
|
@@ -15322,6 +15618,35 @@ const CustomRender = (props) => {
|
|
|
15322
15618
|
}
|
|
15323
15619
|
onTabClick && onTabClick(key);
|
|
15324
15620
|
};
|
|
15621
|
+
const initCustomSelected = () => {
|
|
15622
|
+
if (modelValue.length > 0) {
|
|
15623
|
+
let tagIndex = 0;
|
|
15624
|
+
const selectedRegionC = selectedRegion && Object.assign(selectedRegion);
|
|
15625
|
+
for (let index2 = 0; index2 < modelValue.length; index2++) {
|
|
15626
|
+
if (regionList[tabName[index2]].length === 0) {
|
|
15627
|
+
tagIndex = index2 - 1;
|
|
15628
|
+
setTabIndex(index2 - 1);
|
|
15629
|
+
break;
|
|
15630
|
+
} else {
|
|
15631
|
+
const val = modelValue[index2];
|
|
15632
|
+
const arr = regionList[tabName[index2]];
|
|
15633
|
+
if (privateType === "custom") {
|
|
15634
|
+
selectedRegionC[[tabName[index2]]] = arr.filter((item) => item.id === val)[0];
|
|
15635
|
+
} else if (privateType === "custom2") {
|
|
15636
|
+
const sumArr = [];
|
|
15637
|
+
arr.forEach((item) => {
|
|
15638
|
+
sumArr.push(...item.list);
|
|
15639
|
+
});
|
|
15640
|
+
selectedRegionC[[tabName[index2]]] = sumArr.filter((item) => item.id === val)[0];
|
|
15641
|
+
}
|
|
15642
|
+
tagIndex = index2;
|
|
15643
|
+
setSelectedRegion(selectedRegionC);
|
|
15644
|
+
}
|
|
15645
|
+
}
|
|
15646
|
+
setTabIndex(tagIndex);
|
|
15647
|
+
lineAnimation(tagIndex);
|
|
15648
|
+
}
|
|
15649
|
+
};
|
|
15325
15650
|
const handleElevatorItem = (key, item) => {
|
|
15326
15651
|
nextAreaList(item);
|
|
15327
15652
|
};
|
|
@@ -15353,11 +15678,14 @@ const CustomRender = (props) => {
|
|
|
15353
15678
|
town: isCustom2() ? transformData(town2) : town2
|
|
15354
15679
|
});
|
|
15355
15680
|
}, [town]);
|
|
15681
|
+
useEffect(() => {
|
|
15682
|
+
initCustomSelected();
|
|
15683
|
+
}, [modelValue]);
|
|
15356
15684
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15357
15685
|
className: b2("custom")
|
|
15358
15686
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15359
15687
|
className: b2("region-tab")
|
|
15360
|
-
}, Object.keys(selectedRegion).map((key, index2) => {
|
|
15688
|
+
}, selectedRegion && Object.keys(selectedRegion).map((key, index2) => {
|
|
15361
15689
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15362
15690
|
className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""}`,
|
|
15363
15691
|
key: index2,
|
|
@@ -15375,14 +15703,17 @@ const CustomRender = (props) => {
|
|
|
15375
15703
|
}, regionList[tabName[tabIndex]].map((item, index2) => {
|
|
15376
15704
|
return /* @__PURE__ */ React__default.createElement("li", {
|
|
15377
15705
|
key: index2,
|
|
15378
|
-
className: b2("region-item")
|
|
15379
|
-
|
|
15380
|
-
|
|
15706
|
+
className: b2("region-item")
|
|
15707
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15708
|
+
onClick: () => {
|
|
15709
|
+
nextAreaList(item);
|
|
15710
|
+
}
|
|
15711
|
+
}, selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15381
15712
|
className: b2("region-item--icon"),
|
|
15382
15713
|
name: "Check",
|
|
15383
15714
|
color: "#FA2C19",
|
|
15384
15715
|
size: "13px"
|
|
15385
|
-
}), item.name);
|
|
15716
|
+
}), item.name));
|
|
15386
15717
|
}))), privateType === "custom2" && /* @__PURE__ */ React__default.createElement("div", {
|
|
15387
15718
|
className: b2("elevator-group")
|
|
15388
15719
|
}, /* @__PURE__ */ React__default.createElement(Elevator, {
|
|
@@ -15393,6 +15724,7 @@ const CustomRender = (props) => {
|
|
|
15393
15724
|
};
|
|
15394
15725
|
const defaultProps$6 = {
|
|
15395
15726
|
modelValue: false,
|
|
15727
|
+
modelSelect: [],
|
|
15396
15728
|
type: "custom",
|
|
15397
15729
|
customAddressTitle: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
|
|
15398
15730
|
province: [],
|
|
@@ -15413,6 +15745,7 @@ const Address = (props) => {
|
|
|
15413
15745
|
const { locale } = useConfig();
|
|
15414
15746
|
const {
|
|
15415
15747
|
modelValue,
|
|
15748
|
+
modelSelect,
|
|
15416
15749
|
children,
|
|
15417
15750
|
type,
|
|
15418
15751
|
height,
|
|
@@ -15460,8 +15793,7 @@ const Address = (props) => {
|
|
|
15460
15793
|
const callbackParams = {
|
|
15461
15794
|
next: item.next,
|
|
15462
15795
|
value: item.value,
|
|
15463
|
-
custom: item.custom
|
|
15464
|
-
selectedRegion: {}
|
|
15796
|
+
custom: item.custom
|
|
15465
15797
|
};
|
|
15466
15798
|
setSelectedRegion({
|
|
15467
15799
|
...item.selectedRegion
|
|
@@ -15469,7 +15801,6 @@ const Address = (props) => {
|
|
|
15469
15801
|
onChange && onChange(callbackParams);
|
|
15470
15802
|
};
|
|
15471
15803
|
const selectedExist = (prevExistAdd, item, copyExistAdd) => {
|
|
15472
|
-
console.log(prevExistAdd, item, copyExistAdd);
|
|
15473
15804
|
setSelectedExistAddress(item);
|
|
15474
15805
|
onSelected && onSelected(prevExistAdd, item, copyExistAdd);
|
|
15475
15806
|
handClose();
|
|
@@ -15481,7 +15812,6 @@ const Address = (props) => {
|
|
|
15481
15812
|
[tabName[i]]: {}
|
|
15482
15813
|
});
|
|
15483
15814
|
}
|
|
15484
|
-
console.log(selectedRegion);
|
|
15485
15815
|
};
|
|
15486
15816
|
const closeFun = () => {
|
|
15487
15817
|
const resCopy = {
|
|
@@ -15490,7 +15820,11 @@ const Address = (props) => {
|
|
|
15490
15820
|
...selectedRegion
|
|
15491
15821
|
};
|
|
15492
15822
|
const res = {
|
|
15493
|
-
data: {
|
|
15823
|
+
data: {
|
|
15824
|
+
addressIdStr: "",
|
|
15825
|
+
addressStr: "",
|
|
15826
|
+
...selectedRegion
|
|
15827
|
+
},
|
|
15494
15828
|
type: privateType
|
|
15495
15829
|
};
|
|
15496
15830
|
if (privateType === "custom" || privateType === "custom2") {
|
|
@@ -15562,6 +15896,7 @@ const Address = (props) => {
|
|
|
15562
15896
|
style: { ...style },
|
|
15563
15897
|
...rest
|
|
15564
15898
|
}, headerRender(), (privateType === "custom" || privateType === "custom2") && /* @__PURE__ */ React__default.createElement(CustomRender, {
|
|
15899
|
+
modelValue: modelSelect,
|
|
15565
15900
|
type: privateType,
|
|
15566
15901
|
province,
|
|
15567
15902
|
city,
|
|
@@ -16043,4 +16378,4 @@ const TimeSelect = (props) => {
|
|
|
16043
16378
|
};
|
|
16044
16379
|
TimeSelect.defaultProps = defaultProps;
|
|
16045
16380
|
TimeSelect.displayName = "NutTimeSelect";
|
|
16046
|
-
export { ActionSheet, Address, AnimatingNumbers, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Icon, Indicator, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };
|
|
16381
|
+
export { ActionSheet, Address, AnimatingNumbers, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Icon, Indicator, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, SubSideNavBar, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };
|