@nutui/nutui-react 1.2.2-beta.1 → 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/Radio.js +24 -4
- 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 +667 -317
- 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 +4 -4
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,
|
|
@@ -5996,7 +6159,13 @@ const Radio = (props) => {
|
|
|
5996
6159
|
}, children);
|
|
5997
6160
|
};
|
|
5998
6161
|
const color = () => {
|
|
5999
|
-
|
|
6162
|
+
if (disabledStatement) {
|
|
6163
|
+
return "nut-radio__icon--disable";
|
|
6164
|
+
}
|
|
6165
|
+
if (checkedStatement) {
|
|
6166
|
+
return "nut-radio__icon";
|
|
6167
|
+
}
|
|
6168
|
+
return "nut-radio__icon--unchecked";
|
|
6000
6169
|
};
|
|
6001
6170
|
const renderIcon = () => {
|
|
6002
6171
|
const { iconName: iconName2, iconSize: iconSize2, iconActiveName: iconActiveName2 } = props;
|
|
@@ -6006,24 +6175,33 @@ const Radio = (props) => {
|
|
|
6006
6175
|
className: color()
|
|
6007
6176
|
});
|
|
6008
6177
|
};
|
|
6009
|
-
const
|
|
6010
|
-
if (
|
|
6178
|
+
const renderRadioItem = () => {
|
|
6179
|
+
if (shape === "button") {
|
|
6180
|
+
return renderButton();
|
|
6181
|
+
}
|
|
6182
|
+
if (reverseState) {
|
|
6183
|
+
return [renderLabel(), renderIcon()];
|
|
6184
|
+
}
|
|
6185
|
+
return [renderIcon(), renderLabel()];
|
|
6186
|
+
};
|
|
6187
|
+
const handleClick2 = (e2) => {
|
|
6188
|
+
if (disabledStatement || checkedStatement)
|
|
6011
6189
|
return;
|
|
6012
6190
|
setCheckedStatement(!checkedStatement);
|
|
6013
|
-
|
|
6191
|
+
onChange && onChange(e2);
|
|
6014
6192
|
context2 && context2.onChange(valueStatement);
|
|
6015
6193
|
};
|
|
6016
6194
|
const reverseState = textPosition === "left";
|
|
6017
6195
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6018
6196
|
className: `nut-radio ${className}`,
|
|
6019
|
-
onClick:
|
|
6197
|
+
onClick: handleClick2,
|
|
6020
6198
|
...rest
|
|
6021
|
-
},
|
|
6199
|
+
}, renderRadioItem());
|
|
6022
6200
|
};
|
|
6023
|
-
Radio.defaultProps = defaultProps$
|
|
6201
|
+
Radio.defaultProps = defaultProps$I;
|
|
6024
6202
|
Radio.displayName = "NutRadio";
|
|
6025
6203
|
Radio.RadioGroup = RadioGroup;
|
|
6026
|
-
const defaultProps$
|
|
6204
|
+
const defaultProps$H = {
|
|
6027
6205
|
count: 5,
|
|
6028
6206
|
modelValue: 0,
|
|
6029
6207
|
minimizeValue: 0,
|
|
@@ -6052,7 +6230,7 @@ const Rate = (props) => {
|
|
|
6052
6230
|
allowHalf,
|
|
6053
6231
|
spacing,
|
|
6054
6232
|
change
|
|
6055
|
-
} = { ...defaultProps$
|
|
6233
|
+
} = { ...defaultProps$H, ...props };
|
|
6056
6234
|
const b2 = cn("rate");
|
|
6057
6235
|
const bi = cn("rate-item");
|
|
6058
6236
|
const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
|
|
@@ -6116,9 +6294,9 @@ const Rate = (props) => {
|
|
|
6116
6294
|
}));
|
|
6117
6295
|
}));
|
|
6118
6296
|
};
|
|
6119
|
-
Rate.defaultProps = defaultProps$
|
|
6297
|
+
Rate.defaultProps = defaultProps$H;
|
|
6120
6298
|
Rate.displayName = "NutRate";
|
|
6121
|
-
const defaultProps$
|
|
6299
|
+
const defaultProps$G = {
|
|
6122
6300
|
title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
6123
6301
|
desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
|
|
6124
6302
|
tips: "\u5FD8\u8BB0\u5BC6\u7801",
|
|
@@ -6278,9 +6456,9 @@ const ShortPassword = (props) => {
|
|
|
6278
6456
|
onClick: () => sure()
|
|
6279
6457
|
}, locale.confirm)) : null)));
|
|
6280
6458
|
};
|
|
6281
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6459
|
+
ShortPassword.defaultProps = defaultProps$G;
|
|
6282
6460
|
ShortPassword.displayName = "NutShortPassword";
|
|
6283
|
-
const defaultProps$
|
|
6461
|
+
const defaultProps$F = {
|
|
6284
6462
|
defaultValue: "",
|
|
6285
6463
|
textAlign: "left",
|
|
6286
6464
|
limitshow: false,
|
|
@@ -6308,7 +6486,7 @@ const TextArea = (props) => {
|
|
|
6308
6486
|
onChange,
|
|
6309
6487
|
onBlur,
|
|
6310
6488
|
onFocus
|
|
6311
|
-
} = { ...defaultProps$
|
|
6489
|
+
} = { ...defaultProps$F, ...props };
|
|
6312
6490
|
const textareaBem = cn("textarea");
|
|
6313
6491
|
const [inputValue, SetInputValue] = useState("");
|
|
6314
6492
|
useEffect(() => {
|
|
@@ -6372,7 +6550,7 @@ const TextArea = (props) => {
|
|
|
6372
6550
|
className: textareaBem("limit")
|
|
6373
6551
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6374
6552
|
};
|
|
6375
|
-
TextArea.defaultProps = defaultProps$
|
|
6553
|
+
TextArea.defaultProps = defaultProps$F;
|
|
6376
6554
|
TextArea.displayName = "NutTextArea";
|
|
6377
6555
|
class UploadOptions {
|
|
6378
6556
|
constructor() {
|
|
@@ -6421,7 +6599,7 @@ class Upload {
|
|
|
6421
6599
|
}
|
|
6422
6600
|
}
|
|
6423
6601
|
}
|
|
6424
|
-
const defaultProps$
|
|
6602
|
+
const defaultProps$E = {
|
|
6425
6603
|
url: "",
|
|
6426
6604
|
maximum: 1,
|
|
6427
6605
|
uploadIcon: "photograph",
|
|
@@ -6496,7 +6674,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6496
6674
|
beforeUpload,
|
|
6497
6675
|
beforeDelete,
|
|
6498
6676
|
...restProps
|
|
6499
|
-
} = { ...defaultProps$
|
|
6677
|
+
} = { ...defaultProps$E, ...props };
|
|
6500
6678
|
const [fileList, setFileList] = useState([]);
|
|
6501
6679
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
6502
6680
|
useEffect(() => {
|
|
@@ -6785,9 +6963,9 @@ const InternalUploader = (props, ref) => {
|
|
|
6785
6963
|
})));
|
|
6786
6964
|
};
|
|
6787
6965
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6788
|
-
Uploader.defaultProps = defaultProps$
|
|
6966
|
+
Uploader.defaultProps = defaultProps$E;
|
|
6789
6967
|
Uploader.displayName = "NutUploader";
|
|
6790
|
-
const defaultProps$
|
|
6968
|
+
const defaultProps$D = {
|
|
6791
6969
|
placeholder: "",
|
|
6792
6970
|
shape: "square",
|
|
6793
6971
|
disabled: false,
|
|
@@ -6834,7 +7012,7 @@ const SearchBar = (props) => {
|
|
|
6834
7012
|
onClickRightinIcon,
|
|
6835
7013
|
onClickRightoutIcon
|
|
6836
7014
|
} = {
|
|
6837
|
-
...defaultProps$
|
|
7015
|
+
...defaultProps$D,
|
|
6838
7016
|
...props
|
|
6839
7017
|
};
|
|
6840
7018
|
const alignClass = `${align}`;
|
|
@@ -6971,9 +7149,9 @@ const SearchBar = (props) => {
|
|
|
6971
7149
|
className: `${searchbarBem("content")}`
|
|
6972
7150
|
}, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
6973
7151
|
};
|
|
6974
|
-
SearchBar.defaultProps = defaultProps$
|
|
7152
|
+
SearchBar.defaultProps = defaultProps$D;
|
|
6975
7153
|
SearchBar.displayName = "NutSearchBar";
|
|
6976
|
-
const defaultProps$
|
|
7154
|
+
const defaultProps$C = {
|
|
6977
7155
|
confirmText: "",
|
|
6978
7156
|
title: "",
|
|
6979
7157
|
visible: false,
|
|
@@ -7160,9 +7338,9 @@ const NumberKeyboard = (props) => {
|
|
|
7160
7338
|
})
|
|
7161
7339
|
}, confirmText || locale.done))) : null))));
|
|
7162
7340
|
};
|
|
7163
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7341
|
+
NumberKeyboard.defaultProps = defaultProps$C;
|
|
7164
7342
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7165
|
-
const defaultProps$
|
|
7343
|
+
const defaultProps$B = {
|
|
7166
7344
|
cancelTxt: "",
|
|
7167
7345
|
optionTag: "name",
|
|
7168
7346
|
optionSubTag: "subname",
|
|
@@ -7195,7 +7373,7 @@ const ActionSheet = (props) => {
|
|
|
7195
7373
|
className,
|
|
7196
7374
|
style,
|
|
7197
7375
|
...rest
|
|
7198
|
-
} = { ...defaultProps$
|
|
7376
|
+
} = { ...defaultProps$B, ...props };
|
|
7199
7377
|
const b2 = cn("actionsheet");
|
|
7200
7378
|
const isHighlight = (item) => {
|
|
7201
7379
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
@@ -7239,9 +7417,9 @@ const ActionSheet = (props) => {
|
|
|
7239
7417
|
onClick: () => cancelActionSheet()
|
|
7240
7418
|
}, cancelTxt)));
|
|
7241
7419
|
};
|
|
7242
|
-
ActionSheet.defaultProps = defaultProps$
|
|
7420
|
+
ActionSheet.defaultProps = defaultProps$B;
|
|
7243
7421
|
ActionSheet.displayName = "NutActionSheet";
|
|
7244
|
-
const defaultProps$
|
|
7422
|
+
const defaultProps$A = {
|
|
7245
7423
|
bottom: 20,
|
|
7246
7424
|
right: 10,
|
|
7247
7425
|
elId: "body",
|
|
@@ -7264,7 +7442,7 @@ const BackTop = (props) => {
|
|
|
7264
7442
|
style,
|
|
7265
7443
|
onClick
|
|
7266
7444
|
} = {
|
|
7267
|
-
...defaultProps$
|
|
7445
|
+
...defaultProps$A,
|
|
7268
7446
|
...props
|
|
7269
7447
|
};
|
|
7270
7448
|
const [backTop, SetBackTop] = useState(false);
|
|
@@ -7353,7 +7531,7 @@ const BackTop = (props) => {
|
|
|
7353
7531
|
name: "top"
|
|
7354
7532
|
}));
|
|
7355
7533
|
};
|
|
7356
|
-
BackTop.defaultProps = defaultProps$
|
|
7534
|
+
BackTop.defaultProps = defaultProps$A;
|
|
7357
7535
|
BackTop.displayName = "NutBackTop";
|
|
7358
7536
|
function clamp(v2, min, max) {
|
|
7359
7537
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -11756,7 +11934,7 @@ const host = createHost(primitives, {
|
|
|
11756
11934
|
}
|
|
11757
11935
|
});
|
|
11758
11936
|
const animated = host.animated;
|
|
11759
|
-
const defaultProps$
|
|
11937
|
+
const defaultProps$z = {
|
|
11760
11938
|
attract: false,
|
|
11761
11939
|
direction: void 0,
|
|
11762
11940
|
boundary: {
|
|
@@ -11769,7 +11947,7 @@ const defaultProps$y = {
|
|
|
11769
11947
|
};
|
|
11770
11948
|
const Drag = (props) => {
|
|
11771
11949
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
11772
|
-
...defaultProps$
|
|
11950
|
+
...defaultProps$z,
|
|
11773
11951
|
...props
|
|
11774
11952
|
};
|
|
11775
11953
|
const b2 = cn("drag");
|
|
@@ -11828,7 +12006,7 @@ const Drag = (props) => {
|
|
|
11828
12006
|
...bind()
|
|
11829
12007
|
}, children));
|
|
11830
12008
|
};
|
|
11831
|
-
Drag.defaultProps = defaultProps$
|
|
12009
|
+
Drag.defaultProps = defaultProps$z;
|
|
11832
12010
|
Drag.displayName = "NutDrag";
|
|
11833
12011
|
const Content = (props) => {
|
|
11834
12012
|
const {
|
|
@@ -11854,12 +12032,12 @@ const Content = (props) => {
|
|
|
11854
12032
|
})
|
|
11855
12033
|
}, footer);
|
|
11856
12034
|
}
|
|
11857
|
-
const
|
|
12035
|
+
const handleClick2 = () => {
|
|
11858
12036
|
onClickSelf && onClickSelf();
|
|
11859
12037
|
};
|
|
11860
12038
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
11861
12039
|
className: "nut-dialog__outer",
|
|
11862
|
-
onClick:
|
|
12040
|
+
onClick: handleClick2
|
|
11863
12041
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
11864
12042
|
className: "nut-dialog",
|
|
11865
12043
|
style: { display: visible ? "flex" : "none" }
|
|
@@ -11885,7 +12063,7 @@ const DialogWrap = (props) => {
|
|
|
11885
12063
|
onClosed,
|
|
11886
12064
|
onCancel
|
|
11887
12065
|
} = props;
|
|
11888
|
-
const
|
|
12066
|
+
const handleClick2 = (e2) => {
|
|
11889
12067
|
if (closeOnClickOverlay && visible && e2.target === e2.currentTarget) {
|
|
11890
12068
|
onClosed == null ? void 0 : onClosed();
|
|
11891
12069
|
onCancel == null ? void 0 : onCancel();
|
|
@@ -11907,7 +12085,7 @@ const DialogWrap = (props) => {
|
|
|
11907
12085
|
appear: true
|
|
11908
12086
|
}, /* @__PURE__ */ React__default.createElement(Mask, null)) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
11909
12087
|
className: classNames("nut-dialog__wrap", className),
|
|
11910
|
-
onClick:
|
|
12088
|
+
onClick: handleClick2,
|
|
11911
12089
|
style: wrapStyle
|
|
11912
12090
|
}, /* @__PURE__ */ React__default.createElement(Content, {
|
|
11913
12091
|
...props,
|
|
@@ -12020,7 +12198,7 @@ function confirm(config2, renderFunc) {
|
|
|
12020
12198
|
update: update2
|
|
12021
12199
|
};
|
|
12022
12200
|
}
|
|
12023
|
-
const defaultProps$
|
|
12201
|
+
const defaultProps$y = {
|
|
12024
12202
|
okText: "",
|
|
12025
12203
|
cancelText: "",
|
|
12026
12204
|
mask: true,
|
|
@@ -12111,9 +12289,9 @@ Dialog.confirm = (props) => {
|
|
|
12111
12289
|
});
|
|
12112
12290
|
};
|
|
12113
12291
|
});
|
|
12114
|
-
Dialog.defaultProps = defaultProps$
|
|
12292
|
+
Dialog.defaultProps = defaultProps$y;
|
|
12115
12293
|
Dialog.displayName = "NutDialog";
|
|
12116
|
-
const defaultProps$
|
|
12294
|
+
const defaultProps$x = {
|
|
12117
12295
|
hasMore: true,
|
|
12118
12296
|
threshold: 200,
|
|
12119
12297
|
containerId: "",
|
|
@@ -12147,7 +12325,7 @@ const Infiniteloading = (props) => {
|
|
|
12147
12325
|
scrollChange,
|
|
12148
12326
|
...restProps
|
|
12149
12327
|
} = {
|
|
12150
|
-
...defaultProps$
|
|
12328
|
+
...defaultProps$x,
|
|
12151
12329
|
...props
|
|
12152
12330
|
};
|
|
12153
12331
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -12304,7 +12482,7 @@ const Infiniteloading = (props) => {
|
|
|
12304
12482
|
className: "tips"
|
|
12305
12483
|
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
12306
12484
|
};
|
|
12307
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
12485
|
+
Infiniteloading.defaultProps = defaultProps$x;
|
|
12308
12486
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
12309
12487
|
class Notification extends React.PureComponent {
|
|
12310
12488
|
constructor(props) {
|
|
@@ -12463,7 +12641,7 @@ var Notify = {
|
|
|
12463
12641
|
}
|
|
12464
12642
|
}
|
|
12465
12643
|
};
|
|
12466
|
-
const defaultProps$
|
|
12644
|
+
const defaultProps$w = {
|
|
12467
12645
|
isAsync: false,
|
|
12468
12646
|
checked: false,
|
|
12469
12647
|
disable: false,
|
|
@@ -12486,7 +12664,7 @@ const Switch = (props) => {
|
|
|
12486
12664
|
className,
|
|
12487
12665
|
style
|
|
12488
12666
|
} = {
|
|
12489
|
-
...defaultProps$
|
|
12667
|
+
...defaultProps$w,
|
|
12490
12668
|
...props
|
|
12491
12669
|
};
|
|
12492
12670
|
const [value, setValue] = useState(false);
|
|
@@ -12526,10 +12704,10 @@ const Switch = (props) => {
|
|
|
12526
12704
|
className: `${b2("label")} close`
|
|
12527
12705
|
}, inactiveText))));
|
|
12528
12706
|
};
|
|
12529
|
-
Switch.defaultProps = defaultProps$
|
|
12707
|
+
Switch.defaultProps = defaultProps$w;
|
|
12530
12708
|
Switch.displayName = "NutSwitch";
|
|
12531
12709
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
12532
|
-
const defaultProps$
|
|
12710
|
+
const defaultProps$v = {
|
|
12533
12711
|
strokeWidth: 5,
|
|
12534
12712
|
radius: 50,
|
|
12535
12713
|
strokeLinecap: "round",
|
|
@@ -12552,7 +12730,7 @@ const CircleProgress = (props) => {
|
|
|
12552
12730
|
strokeLinecap,
|
|
12553
12731
|
...restProps
|
|
12554
12732
|
} = {
|
|
12555
|
-
...defaultProps$
|
|
12733
|
+
...defaultProps$v,
|
|
12556
12734
|
...props
|
|
12557
12735
|
};
|
|
12558
12736
|
const b2 = cn("circleprogress");
|
|
@@ -12636,9 +12814,9 @@ const CircleProgress = (props) => {
|
|
|
12636
12814
|
className: "nut-circleprogress-text"
|
|
12637
12815
|
}, children || /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
12638
12816
|
};
|
|
12639
|
-
CircleProgress.defaultProps = defaultProps$
|
|
12817
|
+
CircleProgress.defaultProps = defaultProps$v;
|
|
12640
12818
|
CircleProgress.displayName = "NutCircleProgress";
|
|
12641
|
-
const defaultProps$
|
|
12819
|
+
const defaultProps$u = {
|
|
12642
12820
|
direction: "across",
|
|
12643
12821
|
list: [],
|
|
12644
12822
|
standTime: 1e3,
|
|
@@ -12676,7 +12854,7 @@ const NoticeBar = (props) => {
|
|
|
12676
12854
|
rightIcon,
|
|
12677
12855
|
close,
|
|
12678
12856
|
click
|
|
12679
|
-
} = { ...defaultProps$
|
|
12857
|
+
} = { ...defaultProps$u, ...props };
|
|
12680
12858
|
const wrap = useRef(null);
|
|
12681
12859
|
const content = useRef(null);
|
|
12682
12860
|
const [showNoticeBar, SetShowNoticeBar] = useState(true);
|
|
@@ -12751,7 +12929,7 @@ const NoticeBar = (props) => {
|
|
|
12751
12929
|
}
|
|
12752
12930
|
});
|
|
12753
12931
|
};
|
|
12754
|
-
const
|
|
12932
|
+
const handleClick2 = (event) => {
|
|
12755
12933
|
click && click(event);
|
|
12756
12934
|
};
|
|
12757
12935
|
const onClickIcon = (event) => {
|
|
@@ -12836,7 +13014,7 @@ const NoticeBar = (props) => {
|
|
|
12836
13014
|
}, showNoticeBar && direction == "across" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12837
13015
|
className: noticebarClass,
|
|
12838
13016
|
style: barStyle,
|
|
12839
|
-
onClick:
|
|
13017
|
+
onClick: handleClick2
|
|
12840
13018
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12841
13019
|
className: "left-icon",
|
|
12842
13020
|
style: { backgroundImage: `url(${leftIcon || ""})` }
|
|
@@ -12889,16 +13067,16 @@ const NoticeBar = (props) => {
|
|
|
12889
13067
|
size: "11px"
|
|
12890
13068
|
}) : null))) : null);
|
|
12891
13069
|
};
|
|
12892
|
-
NoticeBar.defaultProps = defaultProps$
|
|
13070
|
+
NoticeBar.defaultProps = defaultProps$u;
|
|
12893
13071
|
NoticeBar.displayName = "NutNoticeBar";
|
|
12894
13072
|
const DataContext$1 = createContext({});
|
|
12895
|
-
const defaultProps$
|
|
13073
|
+
const defaultProps$t = {
|
|
12896
13074
|
current: 0,
|
|
12897
13075
|
direction: "horizontal",
|
|
12898
13076
|
progressDot: false
|
|
12899
13077
|
};
|
|
12900
13078
|
const Steps = (props) => {
|
|
12901
|
-
const propSteps = { ...defaultProps$
|
|
13079
|
+
const propSteps = { ...defaultProps$t, ...props };
|
|
12902
13080
|
const {
|
|
12903
13081
|
children,
|
|
12904
13082
|
current,
|
|
@@ -12923,9 +13101,9 @@ const Steps = (props) => {
|
|
|
12923
13101
|
...restProps
|
|
12924
13102
|
}, children));
|
|
12925
13103
|
};
|
|
12926
|
-
Steps.defaultProps = defaultProps$
|
|
13104
|
+
Steps.defaultProps = defaultProps$t;
|
|
12927
13105
|
Steps.displayName = "NutSteps";
|
|
12928
|
-
const defaultProps$
|
|
13106
|
+
const defaultProps$s = {
|
|
12929
13107
|
title: "",
|
|
12930
13108
|
content: "",
|
|
12931
13109
|
activeIndex: 0,
|
|
@@ -12946,7 +13124,7 @@ const Step = (props) => {
|
|
|
12946
13124
|
renderContent,
|
|
12947
13125
|
...restProps
|
|
12948
13126
|
} = {
|
|
12949
|
-
...defaultProps$
|
|
13127
|
+
...defaultProps$s,
|
|
12950
13128
|
...props
|
|
12951
13129
|
};
|
|
12952
13130
|
const parent = useContext$1(DataContext$1);
|
|
@@ -13003,10 +13181,10 @@ const Step = (props) => {
|
|
|
13003
13181
|
className: "nut-step-content"
|
|
13004
13182
|
}, renderContent())));
|
|
13005
13183
|
};
|
|
13006
|
-
Step.defaultProps = defaultProps$
|
|
13184
|
+
Step.defaultProps = defaultProps$s;
|
|
13007
13185
|
Step.displayName = "NutStep";
|
|
13008
13186
|
const DataContext = createContext({});
|
|
13009
|
-
const defaultProps$
|
|
13187
|
+
const defaultProps$r = {
|
|
13010
13188
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
13011
13189
|
height: 0,
|
|
13012
13190
|
duration: 500,
|
|
@@ -13019,11 +13197,12 @@ const defaultProps$q = {
|
|
|
13019
13197
|
touchable: true,
|
|
13020
13198
|
isPreventDefault: true,
|
|
13021
13199
|
isStopPropagation: true,
|
|
13200
|
+
isCenter: false,
|
|
13022
13201
|
className: ""
|
|
13023
13202
|
};
|
|
13024
13203
|
const DISTANCE = 5;
|
|
13025
13204
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
13026
|
-
const propSwiper = { ...defaultProps$
|
|
13205
|
+
const propSwiper = { ...defaultProps$r, ...props };
|
|
13027
13206
|
const {
|
|
13028
13207
|
children,
|
|
13029
13208
|
direction,
|
|
@@ -13037,6 +13216,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13037
13216
|
isPreventDefault,
|
|
13038
13217
|
isStopPropagation,
|
|
13039
13218
|
autoPlay,
|
|
13219
|
+
isCenter,
|
|
13040
13220
|
...rest
|
|
13041
13221
|
} = propSwiper;
|
|
13042
13222
|
const container = useRef(null);
|
|
@@ -13186,7 +13366,6 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13186
13366
|
props.onChange && props.onChange((targetActive + childCount) % childCount);
|
|
13187
13367
|
}
|
|
13188
13368
|
active = targetActive;
|
|
13189
|
-
offset2 = targetOffset;
|
|
13190
13369
|
setActive(targetActive);
|
|
13191
13370
|
setOffset(targetOffset);
|
|
13192
13371
|
getStyle(targetOffset);
|
|
@@ -13259,7 +13438,15 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13259
13438
|
});
|
|
13260
13439
|
const getStyle = (moveOffset = offset) => {
|
|
13261
13440
|
const target = innerRef.current;
|
|
13262
|
-
|
|
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)`}`;
|
|
13263
13450
|
target.style.transitionDuration = `${_swiper.current.moving ? 0 : props.duration}ms`;
|
|
13264
13451
|
target.style[isVertical ? "height" : "width"] = `${Number(size) * childCount}px`;
|
|
13265
13452
|
target.style[isVertical ? "width" : "height"] = `${isVertical ? width : height}px`;
|
|
@@ -13296,7 +13483,11 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13296
13483
|
if (isShouldMove && touch.stateDirection === props.direction) {
|
|
13297
13484
|
const offset2 = isVertical ? touch.offsetY : touch.offsetX;
|
|
13298
13485
|
if (props.loop) {
|
|
13299
|
-
|
|
13486
|
+
if (offset2 > 0) {
|
|
13487
|
+
pace = touch.delta > 0 ? -1 : 1;
|
|
13488
|
+
} else {
|
|
13489
|
+
pace = 0;
|
|
13490
|
+
}
|
|
13300
13491
|
} else {
|
|
13301
13492
|
pace = -Math[touch.delta > 0 ? "ceil" : "floor"](touch.delta / size);
|
|
13302
13493
|
}
|
|
@@ -13365,18 +13556,23 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13365
13556
|
target.removeEventListener("touchend", onTouchEnd, false);
|
|
13366
13557
|
};
|
|
13367
13558
|
});
|
|
13368
|
-
|
|
13369
|
-
|
|
13559
|
+
useEffect(() => {
|
|
13560
|
+
return () => {
|
|
13561
|
+
stopAutoPlay();
|
|
13562
|
+
};
|
|
13563
|
+
}, []);
|
|
13564
|
+
const itemStyle = (index2) => {
|
|
13565
|
+
const style = {};
|
|
13370
13566
|
const _direction = propSwiper.direction || direction;
|
|
13371
13567
|
const _size = size;
|
|
13372
13568
|
if (_size) {
|
|
13373
|
-
|
|
13569
|
+
style[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
|
|
13374
13570
|
}
|
|
13375
13571
|
const offset2 = childOffset[index2];
|
|
13376
13572
|
if (offset2) {
|
|
13377
|
-
|
|
13573
|
+
style.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
|
|
13378
13574
|
}
|
|
13379
|
-
return
|
|
13575
|
+
return style;
|
|
13380
13576
|
};
|
|
13381
13577
|
React__default.useImperativeHandle(ref, () => ({
|
|
13382
13578
|
to: to2,
|
|
@@ -13395,7 +13591,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13395
13591
|
}, React__default.Children.map(childs, (child, index2) => {
|
|
13396
13592
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13397
13593
|
className: b2("item-wrapper"),
|
|
13398
|
-
style:
|
|
13594
|
+
style: itemStyle(index2),
|
|
13399
13595
|
key: index2
|
|
13400
13596
|
}, child);
|
|
13401
13597
|
})), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -13405,30 +13601,28 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
13405
13601
|
})
|
|
13406
13602
|
}, React__default.Children.map(childs, (item, index2) => {
|
|
13407
13603
|
return /* @__PURE__ */ React__default.createElement("i", {
|
|
13408
|
-
style: {
|
|
13409
|
-
backgroundColor:
|
|
13410
|
-
},
|
|
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
|
+
}),
|
|
13411
13611
|
key: index2
|
|
13412
13612
|
});
|
|
13413
13613
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
13414
13614
|
});
|
|
13415
|
-
Swiper.defaultProps = defaultProps$
|
|
13615
|
+
Swiper.defaultProps = defaultProps$r;
|
|
13416
13616
|
Swiper.displayName = "NutSwiper";
|
|
13417
|
-
const defaultProps$
|
|
13617
|
+
const defaultProps$q = {
|
|
13418
13618
|
direction: "horizontal"
|
|
13419
13619
|
};
|
|
13420
13620
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
13421
|
-
const _props = { ...defaultProps$
|
|
13621
|
+
const _props = { ...defaultProps$q, ...props };
|
|
13422
13622
|
const { children, direction, size } = _props;
|
|
13423
13623
|
const parent = useContext$1(DataContext);
|
|
13424
|
-
const [offset, setOffset] = useState(0);
|
|
13425
13624
|
const b2 = cn("swiper-item");
|
|
13426
13625
|
const classes = classNames(b2(""));
|
|
13427
|
-
useImperativeHandle(ref, () => ({
|
|
13428
|
-
changeOffset: (num) => {
|
|
13429
|
-
setOffset(num);
|
|
13430
|
-
}
|
|
13431
|
-
}));
|
|
13432
13626
|
const style = () => {
|
|
13433
13627
|
const style2 = {};
|
|
13434
13628
|
const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
|
|
@@ -13443,10 +13637,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
13443
13637
|
style: style()
|
|
13444
13638
|
}, children);
|
|
13445
13639
|
});
|
|
13446
|
-
SwiperItem.defaultProps = defaultProps$
|
|
13640
|
+
SwiperItem.defaultProps = defaultProps$q;
|
|
13447
13641
|
SwiperItem.displayName = "NutSwiperItem";
|
|
13448
13642
|
const AvatarContext = createContext({});
|
|
13449
|
-
const defaultProps$
|
|
13643
|
+
const defaultProps$p = {
|
|
13450
13644
|
size: "",
|
|
13451
13645
|
icon: "",
|
|
13452
13646
|
bgColor: "#eee",
|
|
@@ -13473,7 +13667,7 @@ const Avatar = (props) => {
|
|
|
13473
13667
|
onError,
|
|
13474
13668
|
...rest
|
|
13475
13669
|
} = {
|
|
13476
|
-
...defaultProps$
|
|
13670
|
+
...defaultProps$p,
|
|
13477
13671
|
...props
|
|
13478
13672
|
};
|
|
13479
13673
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -13553,9 +13747,9 @@ const Avatar = (props) => {
|
|
|
13553
13747
|
className: "text"
|
|
13554
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)}`)));
|
|
13555
13749
|
};
|
|
13556
|
-
Avatar.defaultProps = defaultProps$
|
|
13750
|
+
Avatar.defaultProps = defaultProps$p;
|
|
13557
13751
|
Avatar.displayName = "NutAvatar";
|
|
13558
|
-
const defaultProps$
|
|
13752
|
+
const defaultProps$o = {
|
|
13559
13753
|
maxContent: "",
|
|
13560
13754
|
maxCount: "",
|
|
13561
13755
|
maxBgColor: "#eee",
|
|
@@ -13567,7 +13761,7 @@ const defaultProps$n = {
|
|
|
13567
13761
|
};
|
|
13568
13762
|
const AvatarGroup = (props) => {
|
|
13569
13763
|
useConfig();
|
|
13570
|
-
const propAvatarGroup = { ...defaultProps$
|
|
13764
|
+
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
13571
13765
|
const { className, style, children } = propAvatarGroup;
|
|
13572
13766
|
const avatarGroupRef = useRef(null);
|
|
13573
13767
|
const b2 = cn("avatar-group");
|
|
@@ -13584,9 +13778,9 @@ const AvatarGroup = (props) => {
|
|
|
13584
13778
|
ref: avatarGroupRef
|
|
13585
13779
|
}, children));
|
|
13586
13780
|
};
|
|
13587
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
13781
|
+
AvatarGroup.defaultProps = defaultProps$o;
|
|
13588
13782
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
13589
|
-
const defaultProps$
|
|
13783
|
+
const defaultProps$n = {
|
|
13590
13784
|
price: 0,
|
|
13591
13785
|
needSymbol: true,
|
|
13592
13786
|
symbol: "¥",
|
|
@@ -13604,7 +13798,7 @@ const Price = (props) => {
|
|
|
13604
13798
|
className,
|
|
13605
13799
|
...rest
|
|
13606
13800
|
} = {
|
|
13607
|
-
...defaultProps$
|
|
13801
|
+
...defaultProps$n,
|
|
13608
13802
|
...props
|
|
13609
13803
|
};
|
|
13610
13804
|
const b2 = cn("price");
|
|
@@ -13657,9 +13851,9 @@ const Price = (props) => {
|
|
|
13657
13851
|
className: `${b2("small")}`
|
|
13658
13852
|
}, formatDecimal(price)));
|
|
13659
13853
|
};
|
|
13660
|
-
Price.defaultProps = defaultProps$
|
|
13854
|
+
Price.defaultProps = defaultProps$n;
|
|
13661
13855
|
Price.displayName = "NutPrice";
|
|
13662
|
-
const defaultProps$
|
|
13856
|
+
const defaultProps$m = {
|
|
13663
13857
|
value: "",
|
|
13664
13858
|
dot: false,
|
|
13665
13859
|
max: 1e4,
|
|
@@ -13671,19 +13865,19 @@ const defaultProps$l = {
|
|
|
13671
13865
|
};
|
|
13672
13866
|
const Badge = (props) => {
|
|
13673
13867
|
const { children, dot, top, right, zIndex, color, icons } = {
|
|
13674
|
-
...defaultProps$
|
|
13868
|
+
...defaultProps$m,
|
|
13675
13869
|
...props
|
|
13676
13870
|
};
|
|
13677
|
-
|
|
13871
|
+
function content() {
|
|
13678
13872
|
if (dot)
|
|
13679
|
-
return;
|
|
13873
|
+
return void 0;
|
|
13680
13874
|
const { value } = props;
|
|
13681
13875
|
const { max } = props;
|
|
13682
13876
|
if (typeof value === "number" && typeof max === "number") {
|
|
13683
13877
|
return max < value ? `${max}+` : value;
|
|
13684
13878
|
}
|
|
13685
13879
|
return value;
|
|
13686
|
-
}
|
|
13880
|
+
}
|
|
13687
13881
|
const getStyle = () => {
|
|
13688
13882
|
const style = {};
|
|
13689
13883
|
style.top = `${top}px`;
|
|
@@ -13694,7 +13888,7 @@ const Badge = (props) => {
|
|
|
13694
13888
|
};
|
|
13695
13889
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13696
13890
|
className: "nut-badge"
|
|
13697
|
-
}, icons
|
|
13891
|
+
}, icons !== "" && /* @__PURE__ */ React__default.createElement("div", {
|
|
13698
13892
|
className: "slot-icons"
|
|
13699
13893
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13700
13894
|
className: "_icon",
|
|
@@ -13706,9 +13900,9 @@ const Badge = (props) => {
|
|
|
13706
13900
|
style: getStyle()
|
|
13707
13901
|
}, content()));
|
|
13708
13902
|
};
|
|
13709
|
-
Badge.defaultProps = defaultProps$
|
|
13903
|
+
Badge.defaultProps = defaultProps$m;
|
|
13710
13904
|
Badge.displayName = "NutBadge";
|
|
13711
|
-
const defaultProps$
|
|
13905
|
+
const defaultProps$l = {
|
|
13712
13906
|
type: "default",
|
|
13713
13907
|
color: "",
|
|
13714
13908
|
textColor: "",
|
|
@@ -13736,7 +13930,7 @@ const Tag = (props) => {
|
|
|
13736
13930
|
onClick,
|
|
13737
13931
|
onClose
|
|
13738
13932
|
} = {
|
|
13739
|
-
...defaultProps$
|
|
13933
|
+
...defaultProps$l,
|
|
13740
13934
|
...props
|
|
13741
13935
|
};
|
|
13742
13936
|
const [btnName, setBtnName] = useState("");
|
|
@@ -13764,7 +13958,7 @@ const Tag = (props) => {
|
|
|
13764
13958
|
${mark ? `${prefixCls2}--mark` : ""}
|
|
13765
13959
|
${closeable ? `${prefixCls2}--close` : ""}`;
|
|
13766
13960
|
};
|
|
13767
|
-
const
|
|
13961
|
+
const handleClick2 = (e2) => {
|
|
13768
13962
|
if (props.onClick) {
|
|
13769
13963
|
props.onClick(e2);
|
|
13770
13964
|
}
|
|
@@ -13787,7 +13981,7 @@ const Tag = (props) => {
|
|
|
13787
13981
|
return /* @__PURE__ */ React__default.createElement("div", null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
|
|
13788
13982
|
className: `${btnName}`,
|
|
13789
13983
|
style: getStyle(),
|
|
13790
|
-
onClick: (e2) =>
|
|
13984
|
+
onClick: (e2) => handleClick2(e2)
|
|
13791
13985
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
13792
13986
|
className: "text"
|
|
13793
13987
|
}, children), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
@@ -13803,12 +13997,12 @@ const Tag = (props) => {
|
|
|
13803
13997
|
})) : /* @__PURE__ */ React__default.createElement("div", {
|
|
13804
13998
|
className: `${btnName}`,
|
|
13805
13999
|
style: getStyle(),
|
|
13806
|
-
onClick: (e2) =>
|
|
14000
|
+
onClick: (e2) => handleClick2(e2)
|
|
13807
14001
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
13808
14002
|
className: "text"
|
|
13809
14003
|
}, children)));
|
|
13810
14004
|
};
|
|
13811
|
-
Tag.defaultProps = defaultProps$
|
|
14005
|
+
Tag.defaultProps = defaultProps$l;
|
|
13812
14006
|
Tag.displayName = "NutTag";
|
|
13813
14007
|
function fillRef(ref, node) {
|
|
13814
14008
|
if (typeof ref === "function") {
|
|
@@ -13825,9 +14019,6 @@ function composeRef(...refs) {
|
|
|
13825
14019
|
};
|
|
13826
14020
|
}
|
|
13827
14021
|
class Trigger extends React__default.Component {
|
|
13828
|
-
constructor(props) {
|
|
13829
|
-
super(props);
|
|
13830
|
-
}
|
|
13831
14022
|
fireEvents(type, e2) {
|
|
13832
14023
|
const childCallback = this.props.children.props[type];
|
|
13833
14024
|
if (childCallback) {
|
|
@@ -13867,7 +14058,7 @@ const getEleAttr = (ele) => {
|
|
|
13867
14058
|
}
|
|
13868
14059
|
return null;
|
|
13869
14060
|
};
|
|
13870
|
-
const defaultProps$
|
|
14061
|
+
const defaultProps$k = {
|
|
13871
14062
|
list: [],
|
|
13872
14063
|
theme: "light",
|
|
13873
14064
|
location: "bottom",
|
|
@@ -13888,7 +14079,7 @@ const Popover = (props) => {
|
|
|
13888
14079
|
onClick,
|
|
13889
14080
|
...reset
|
|
13890
14081
|
} = {
|
|
13891
|
-
...defaultProps$
|
|
14082
|
+
...defaultProps$k,
|
|
13892
14083
|
...props
|
|
13893
14084
|
};
|
|
13894
14085
|
const goodItem = useRef(null);
|
|
@@ -13905,19 +14096,19 @@ const Popover = (props) => {
|
|
|
13905
14096
|
const [popoverContent, setPopoverContent] = useState("");
|
|
13906
14097
|
const [popoverArrow, setPopoverArrow] = useState("");
|
|
13907
14098
|
useEffect(() => {
|
|
13908
|
-
setClasses(
|
|
13909
|
-
setPopoverContent(
|
|
13910
|
-
setPopoverArrow(
|
|
14099
|
+
setClasses(classesSelf());
|
|
14100
|
+
setPopoverContent(popoverContentSelf());
|
|
14101
|
+
setPopoverArrow(popoverArrowSelf());
|
|
13911
14102
|
}, [list, theme]);
|
|
13912
14103
|
const getStyle = () => {
|
|
13913
14104
|
const style2 = {};
|
|
13914
|
-
if (location
|
|
14105
|
+
if (location === "top") {
|
|
13915
14106
|
style2.bottom = elHeight + 20;
|
|
13916
14107
|
style2.left = 0;
|
|
13917
|
-
} else if (location
|
|
14108
|
+
} else if (location === "right") {
|
|
13918
14109
|
style2.top = 0;
|
|
13919
14110
|
style2.right = -elWidth - 20;
|
|
13920
|
-
} else if (location
|
|
14111
|
+
} else if (location === "left") {
|
|
13921
14112
|
style2.top = 0;
|
|
13922
14113
|
style2.left = -elWidth - 20;
|
|
13923
14114
|
} else {
|
|
@@ -13932,13 +14123,13 @@ const Popover = (props) => {
|
|
|
13932
14123
|
};
|
|
13933
14124
|
const getArrowStyle = () => {
|
|
13934
14125
|
const style2 = {};
|
|
13935
|
-
if (location
|
|
14126
|
+
if (location === "top") {
|
|
13936
14127
|
style2.bottom = -20;
|
|
13937
14128
|
style2.left = elWidth / 2;
|
|
13938
|
-
} else if (location
|
|
14129
|
+
} else if (location === "right") {
|
|
13939
14130
|
style2.top = 20;
|
|
13940
14131
|
style2.left = -20;
|
|
13941
|
-
} else if (location
|
|
14132
|
+
} else if (location === "left") {
|
|
13942
14133
|
style2.top = 20;
|
|
13943
14134
|
style2.right = -20;
|
|
13944
14135
|
} else {
|
|
@@ -13951,22 +14142,22 @@ const Popover = (props) => {
|
|
|
13951
14142
|
style2.right += "px";
|
|
13952
14143
|
return style2;
|
|
13953
14144
|
};
|
|
13954
|
-
const
|
|
14145
|
+
const classesSelf = () => {
|
|
13955
14146
|
const prefixCls = "nut-popover";
|
|
13956
14147
|
return `${prefixCls}
|
|
13957
14148
|
${theme ? `${prefixCls}--${theme}` : ""}`;
|
|
13958
14149
|
};
|
|
13959
|
-
const
|
|
14150
|
+
const popoverContentSelf = () => {
|
|
13960
14151
|
const prefixCls = "popoverContent";
|
|
13961
14152
|
return `${prefixCls}
|
|
13962
14153
|
${location ? `${prefixCls}--${location}` : ""}`;
|
|
13963
14154
|
};
|
|
13964
|
-
const
|
|
14155
|
+
const popoverArrowSelf = () => {
|
|
13965
14156
|
const prefixCls = "popoverArrow";
|
|
13966
14157
|
return `${prefixCls}
|
|
13967
14158
|
${location ? `${prefixCls}--${location}` : ""}`;
|
|
13968
14159
|
};
|
|
13969
|
-
const
|
|
14160
|
+
const handleClick2 = (e2) => {
|
|
13970
14161
|
if (props.onClick) {
|
|
13971
14162
|
props.onClick(e2);
|
|
13972
14163
|
}
|
|
@@ -13978,7 +14169,7 @@ const Popover = (props) => {
|
|
|
13978
14169
|
}, /* @__PURE__ */ React__default.createElement(Trigger, {
|
|
13979
14170
|
forwardedRef: goodItem
|
|
13980
14171
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
13981
|
-
onClick: (e2) =>
|
|
14172
|
+
onClick: (e2) => handleClick2(e2)
|
|
13982
14173
|
}, Array.isArray(children) ? children[0] : children, visible ? /* @__PURE__ */ React__default.createElement("div", {
|
|
13983
14174
|
className: `${popoverContent}`,
|
|
13984
14175
|
style: getStyle()
|
|
@@ -13997,9 +14188,9 @@ const Popover = (props) => {
|
|
|
13997
14188
|
}, item.name));
|
|
13998
14189
|
})) : null)));
|
|
13999
14190
|
};
|
|
14000
|
-
Popover.defaultProps = defaultProps$
|
|
14191
|
+
Popover.defaultProps = defaultProps$k;
|
|
14001
14192
|
Popover.displayName = "NutPopover";
|
|
14002
|
-
const defaultProps$
|
|
14193
|
+
const defaultProps$j = {
|
|
14003
14194
|
width: "100px",
|
|
14004
14195
|
height: "100px",
|
|
14005
14196
|
row: 1,
|
|
@@ -14027,7 +14218,7 @@ const Skeleton = (props) => {
|
|
|
14027
14218
|
avatarShape,
|
|
14028
14219
|
...restProps
|
|
14029
14220
|
} = {
|
|
14030
|
-
...defaultProps$
|
|
14221
|
+
...defaultProps$j,
|
|
14031
14222
|
...props
|
|
14032
14223
|
};
|
|
14033
14224
|
const b2 = cn("skeleton");
|
|
@@ -14082,9 +14273,9 @@ const Skeleton = (props) => {
|
|
|
14082
14273
|
});
|
|
14083
14274
|
})))));
|
|
14084
14275
|
};
|
|
14085
|
-
Skeleton.defaultProps = defaultProps$
|
|
14276
|
+
Skeleton.defaultProps = defaultProps$j;
|
|
14086
14277
|
Skeleton.displayName = "NutSkeleton";
|
|
14087
|
-
const defaultProps$
|
|
14278
|
+
const defaultProps$i = {
|
|
14088
14279
|
showPlainText: false,
|
|
14089
14280
|
showDays: false,
|
|
14090
14281
|
paused: false,
|
|
@@ -14107,7 +14298,7 @@ const CountDown = (props) => {
|
|
|
14107
14298
|
onUpdate,
|
|
14108
14299
|
children,
|
|
14109
14300
|
...rest
|
|
14110
|
-
} = { ...defaultProps$
|
|
14301
|
+
} = { ...defaultProps$i, ...props };
|
|
14111
14302
|
const b2 = cn("countdown");
|
|
14112
14303
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
14113
14304
|
const stateRef = useRef({
|
|
@@ -14254,9 +14445,9 @@ const CountDown = (props) => {
|
|
|
14254
14445
|
className: b2("block")
|
|
14255
14446
|
}, resttime.s))));
|
|
14256
14447
|
};
|
|
14257
|
-
CountDown.defaultProps = defaultProps$
|
|
14448
|
+
CountDown.defaultProps = defaultProps$i;
|
|
14258
14449
|
CountDown.displayName = "NutCountDown";
|
|
14259
|
-
const defaultProps$
|
|
14450
|
+
const defaultProps$h = {
|
|
14260
14451
|
activeName: ["0"],
|
|
14261
14452
|
accordion: false,
|
|
14262
14453
|
icon: "",
|
|
@@ -14278,7 +14469,7 @@ const Collapse = memo((props) => {
|
|
|
14278
14469
|
iconColor,
|
|
14279
14470
|
change
|
|
14280
14471
|
} = {
|
|
14281
|
-
...defaultProps$
|
|
14472
|
+
...defaultProps$h,
|
|
14282
14473
|
...props
|
|
14283
14474
|
};
|
|
14284
14475
|
const childrenDom = React__default.Children.toArray(children);
|
|
@@ -14333,9 +14524,9 @@ const Collapse = memo((props) => {
|
|
|
14333
14524
|
});
|
|
14334
14525
|
}));
|
|
14335
14526
|
}, areEqual);
|
|
14336
|
-
Collapse.defaultProps = defaultProps$
|
|
14527
|
+
Collapse.defaultProps = defaultProps$h;
|
|
14337
14528
|
Collapse.displayName = "NutCollapse";
|
|
14338
|
-
const defaultProps$
|
|
14529
|
+
const defaultProps$g = {
|
|
14339
14530
|
title: "",
|
|
14340
14531
|
name: "",
|
|
14341
14532
|
isOpen: false,
|
|
@@ -14369,7 +14560,7 @@ const CollapseItem = (props) => {
|
|
|
14369
14560
|
iconColor,
|
|
14370
14561
|
...rest
|
|
14371
14562
|
} = {
|
|
14372
|
-
...defaultProps$
|
|
14563
|
+
...defaultProps$g,
|
|
14373
14564
|
...props
|
|
14374
14565
|
};
|
|
14375
14566
|
const [domHeight, setDomHeight] = useState(-1);
|
|
@@ -14407,13 +14598,13 @@ const CollapseItem = (props) => {
|
|
|
14407
14598
|
}
|
|
14408
14599
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
14409
14600
|
className: colBem("title")
|
|
14410
|
-
}, titleIcon && titleIconPosition
|
|
14601
|
+
}, titleIcon && titleIconPosition === "left" && /* @__PURE__ */ React__default.createElement("b", {
|
|
14411
14602
|
className: colBem("title-icon-left")
|
|
14412
14603
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14413
14604
|
name: titleIcon,
|
|
14414
14605
|
size: titleIconSize,
|
|
14415
14606
|
color: disabled ? "#C2C2C2" : titleIconColor
|
|
14416
|
-
})), title, titleIcon && titleIconPosition
|
|
14607
|
+
})), title, titleIcon && titleIconPosition === "right" && /* @__PURE__ */ React__default.createElement("b", {
|
|
14417
14608
|
className: colBem("title-icon-right")
|
|
14418
14609
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
14419
14610
|
name: titleIcon,
|
|
@@ -14438,9 +14629,9 @@ const CollapseItem = (props) => {
|
|
|
14438
14629
|
className: colBem("content-text")
|
|
14439
14630
|
}, children)));
|
|
14440
14631
|
};
|
|
14441
|
-
CollapseItem.defaultProps = defaultProps$
|
|
14632
|
+
CollapseItem.defaultProps = defaultProps$g;
|
|
14442
14633
|
CollapseItem.displayName = "NutCollapseItem";
|
|
14443
|
-
const defaultProps$
|
|
14634
|
+
const defaultProps$f = {
|
|
14444
14635
|
maxLen: 0,
|
|
14445
14636
|
endNumber: "",
|
|
14446
14637
|
delaySpeed: 300,
|
|
@@ -14458,7 +14649,7 @@ const CountUp = (props) => {
|
|
|
14458
14649
|
thousands,
|
|
14459
14650
|
...reset
|
|
14460
14651
|
} = {
|
|
14461
|
-
...defaultProps$
|
|
14652
|
+
...defaultProps$f,
|
|
14462
14653
|
...props
|
|
14463
14654
|
};
|
|
14464
14655
|
const b2 = cn("countup");
|
|
@@ -14524,9 +14715,9 @@ const CountUp = (props) => {
|
|
|
14524
14715
|
}, item));
|
|
14525
14716
|
})));
|
|
14526
14717
|
};
|
|
14527
|
-
CountUp.defaultProps = defaultProps$
|
|
14718
|
+
CountUp.defaultProps = defaultProps$f;
|
|
14528
14719
|
CountUp.displayName = "NutCountUp";
|
|
14529
|
-
const defaultProps$
|
|
14720
|
+
const defaultProps$e = {};
|
|
14530
14721
|
class AnimatingNumbers extends Component {
|
|
14531
14722
|
constructor(props) {
|
|
14532
14723
|
super(props);
|
|
@@ -14538,7 +14729,7 @@ class AnimatingNumbers extends Component {
|
|
|
14538
14729
|
});
|
|
14539
14730
|
}
|
|
14540
14731
|
}
|
|
14541
|
-
AnimatingNumbers.defaultProps = defaultProps$
|
|
14732
|
+
AnimatingNumbers.defaultProps = defaultProps$e;
|
|
14542
14733
|
AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
14543
14734
|
AnimatingNumbers.CountUp = CountUp;
|
|
14544
14735
|
AnimatingNumbers.CountUp = CountUp;
|
|
@@ -14547,7 +14738,7 @@ const defaultStatus = {
|
|
|
14547
14738
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
14548
14739
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
14549
14740
|
};
|
|
14550
|
-
const defaultProps$
|
|
14741
|
+
const defaultProps$d = {
|
|
14551
14742
|
description: "\u65E0\u5185\u5BB9",
|
|
14552
14743
|
image: "empty",
|
|
14553
14744
|
imageSize: "",
|
|
@@ -14555,9 +14746,9 @@ const defaultProps$c = {
|
|
|
14555
14746
|
};
|
|
14556
14747
|
const Empty = (props) => {
|
|
14557
14748
|
const { locale } = useConfig();
|
|
14558
|
-
defaultProps$
|
|
14749
|
+
defaultProps$d.description = locale.noData || defaultProps$d.description;
|
|
14559
14750
|
const { image, imageSize, description, children, className, ...rest } = {
|
|
14560
|
-
...defaultProps$
|
|
14751
|
+
...defaultProps$d,
|
|
14561
14752
|
...props
|
|
14562
14753
|
};
|
|
14563
14754
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -14592,14 +14783,14 @@ const Empty = (props) => {
|
|
|
14592
14783
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
14593
14784
|
className: `${b2()} ${className}`,
|
|
14594
14785
|
...rest
|
|
14595
|
-
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
14786
|
+
}, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
14596
14787
|
className: b2("image"),
|
|
14597
14788
|
style: imgStyle
|
|
14598
14789
|
}, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
14599
14790
|
className: b2("description")
|
|
14600
|
-
}, description) : { description }, children);
|
|
14791
|
+
}, description) : { description }, children));
|
|
14601
14792
|
};
|
|
14602
|
-
Empty.defaultProps = defaultProps$
|
|
14793
|
+
Empty.defaultProps = defaultProps$d;
|
|
14603
14794
|
Empty.displayName = "NutEmpty";
|
|
14604
14795
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
14605
14796
|
let index2 = 0;
|
|
@@ -14712,7 +14903,7 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
14712
14903
|
}
|
|
14713
14904
|
});
|
|
14714
14905
|
};
|
|
14715
|
-
const defaultProps$
|
|
14906
|
+
const defaultProps$c = {};
|
|
14716
14907
|
const VirtualList = (props) => {
|
|
14717
14908
|
const {
|
|
14718
14909
|
sourceData = [],
|
|
@@ -14871,8 +15062,125 @@ const VirtualList = (props) => {
|
|
|
14871
15062
|
}) : data);
|
|
14872
15063
|
}))));
|
|
14873
15064
|
};
|
|
14874
|
-
VirtualList.defaultProps = defaultProps$
|
|
15065
|
+
VirtualList.defaultProps = defaultProps$c;
|
|
14875
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";
|
|
14876
15184
|
const defaultProps$a = {
|
|
14877
15185
|
source: {
|
|
14878
15186
|
type: {},
|
|
@@ -15131,7 +15439,8 @@ const ExistRender = (props) => {
|
|
|
15131
15439
|
}, existAddress.map((item, index2) => {
|
|
15132
15440
|
return /* @__PURE__ */ React__default.createElement("li", {
|
|
15133
15441
|
className: b2("exist-item"),
|
|
15134
|
-
key: index2
|
|
15442
|
+
key: index2
|
|
15443
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15135
15444
|
onClick: () => selectedExist(item)
|
|
15136
15445
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
15137
15446
|
className: b2("exist-item-icon"),
|
|
@@ -15148,7 +15457,7 @@ const ExistRender = (props) => {
|
|
|
15148
15457
|
className: "exist-item-info-phone"
|
|
15149
15458
|
}, item.phone)), /* @__PURE__ */ React__default.createElement("div", {
|
|
15150
15459
|
className: "exist-item-info-bottom"
|
|
15151
|
-
}, /* @__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)))));
|
|
15152
15461
|
}))), isShowCustomAddress && /* @__PURE__ */ React__default.createElement("div", {
|
|
15153
15462
|
className: b2("choose-other"),
|
|
15154
15463
|
onClick: switchModule
|
|
@@ -15157,6 +15466,7 @@ const ExistRender = (props) => {
|
|
|
15157
15466
|
}, locale.address.chooseAnotherAddress || customAndExistTitle)));
|
|
15158
15467
|
};
|
|
15159
15468
|
const defaultProps$7 = {
|
|
15469
|
+
modelValue: [],
|
|
15160
15470
|
type: "custom",
|
|
15161
15471
|
province: [],
|
|
15162
15472
|
city: [],
|
|
@@ -15169,6 +15479,7 @@ const CustomRender = (props) => {
|
|
|
15169
15479
|
const {
|
|
15170
15480
|
children,
|
|
15171
15481
|
type,
|
|
15482
|
+
modelValue,
|
|
15172
15483
|
height,
|
|
15173
15484
|
province,
|
|
15174
15485
|
city,
|
|
@@ -15231,9 +15542,7 @@ const CustomRender = (props) => {
|
|
|
15231
15542
|
town: isCustom2() ? transformData(town) : town
|
|
15232
15543
|
});
|
|
15233
15544
|
const [selectedRegion, setSelectedRegion] = useState({
|
|
15234
|
-
province: {
|
|
15235
|
-
name: ""
|
|
15236
|
-
},
|
|
15545
|
+
province: { name: "" },
|
|
15237
15546
|
city: { name: "" },
|
|
15238
15547
|
country: { name: "" },
|
|
15239
15548
|
town: { name: "" }
|
|
@@ -15265,26 +15574,28 @@ const CustomRender = (props) => {
|
|
|
15265
15574
|
const calBack = {
|
|
15266
15575
|
next: "",
|
|
15267
15576
|
value: "",
|
|
15268
|
-
custom: tabName[tabIndex]
|
|
15269
|
-
selectedRegion: {}
|
|
15577
|
+
custom: tabName[tabIndex]
|
|
15270
15578
|
};
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
[tabName[tabIndex]]: item
|
|
15278
|
-
};
|
|
15279
|
-
for (let i = tabIndex; i < tabIndex - 1; i++) {
|
|
15280
|
-
setSelectedRegion(() => ({
|
|
15281
|
-
...selectedRegion,
|
|
15282
|
-
[tabName[i + 1]]: {}
|
|
15283
|
-
}));
|
|
15579
|
+
const bbselectedRegion = selectedRegion ? { ...selectedRegion } : null;
|
|
15580
|
+
if (bbselectedRegion) {
|
|
15581
|
+
setSelectedRegion({
|
|
15582
|
+
...bbselectedRegion,
|
|
15583
|
+
[tabName[tabIndex]]: item
|
|
15584
|
+
});
|
|
15284
15585
|
calBack.selectedRegion = {
|
|
15285
|
-
...
|
|
15286
|
-
[tabName[
|
|
15586
|
+
...bbselectedRegion,
|
|
15587
|
+
[tabName[tabIndex]]: item
|
|
15287
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
|
+
}
|
|
15288
15599
|
}
|
|
15289
15600
|
if (tabIndex < 4) {
|
|
15290
15601
|
if (tabIndex === 3) {
|
|
@@ -15307,6 +15618,35 @@ const CustomRender = (props) => {
|
|
|
15307
15618
|
}
|
|
15308
15619
|
onTabClick && onTabClick(key);
|
|
15309
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
|
+
};
|
|
15310
15650
|
const handleElevatorItem = (key, item) => {
|
|
15311
15651
|
nextAreaList(item);
|
|
15312
15652
|
};
|
|
@@ -15338,11 +15678,14 @@ const CustomRender = (props) => {
|
|
|
15338
15678
|
town: isCustom2() ? transformData(town2) : town2
|
|
15339
15679
|
});
|
|
15340
15680
|
}, [town]);
|
|
15681
|
+
useEffect(() => {
|
|
15682
|
+
initCustomSelected();
|
|
15683
|
+
}, [modelValue]);
|
|
15341
15684
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15342
15685
|
className: b2("custom")
|
|
15343
15686
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
15344
15687
|
className: b2("region-tab")
|
|
15345
|
-
}, Object.keys(selectedRegion).map((key, index2) => {
|
|
15688
|
+
}, selectedRegion && Object.keys(selectedRegion).map((key, index2) => {
|
|
15346
15689
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15347
15690
|
className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""}`,
|
|
15348
15691
|
key: index2,
|
|
@@ -15360,14 +15703,17 @@ const CustomRender = (props) => {
|
|
|
15360
15703
|
}, regionList[tabName[tabIndex]].map((item, index2) => {
|
|
15361
15704
|
return /* @__PURE__ */ React__default.createElement("li", {
|
|
15362
15705
|
key: index2,
|
|
15363
|
-
className: b2("region-item")
|
|
15364
|
-
|
|
15365
|
-
|
|
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, {
|
|
15366
15712
|
className: b2("region-item--icon"),
|
|
15367
15713
|
name: "Check",
|
|
15368
15714
|
color: "#FA2C19",
|
|
15369
15715
|
size: "13px"
|
|
15370
|
-
}), item.name);
|
|
15716
|
+
}), item.name));
|
|
15371
15717
|
}))), privateType === "custom2" && /* @__PURE__ */ React__default.createElement("div", {
|
|
15372
15718
|
className: b2("elevator-group")
|
|
15373
15719
|
}, /* @__PURE__ */ React__default.createElement(Elevator, {
|
|
@@ -15378,6 +15724,7 @@ const CustomRender = (props) => {
|
|
|
15378
15724
|
};
|
|
15379
15725
|
const defaultProps$6 = {
|
|
15380
15726
|
modelValue: false,
|
|
15727
|
+
modelSelect: [],
|
|
15381
15728
|
type: "custom",
|
|
15382
15729
|
customAddressTitle: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
|
|
15383
15730
|
province: [],
|
|
@@ -15398,6 +15745,7 @@ const Address = (props) => {
|
|
|
15398
15745
|
const { locale } = useConfig();
|
|
15399
15746
|
const {
|
|
15400
15747
|
modelValue,
|
|
15748
|
+
modelSelect,
|
|
15401
15749
|
children,
|
|
15402
15750
|
type,
|
|
15403
15751
|
height,
|
|
@@ -15445,8 +15793,7 @@ const Address = (props) => {
|
|
|
15445
15793
|
const callbackParams = {
|
|
15446
15794
|
next: item.next,
|
|
15447
15795
|
value: item.value,
|
|
15448
|
-
custom: item.custom
|
|
15449
|
-
selectedRegion: {}
|
|
15796
|
+
custom: item.custom
|
|
15450
15797
|
};
|
|
15451
15798
|
setSelectedRegion({
|
|
15452
15799
|
...item.selectedRegion
|
|
@@ -15454,7 +15801,6 @@ const Address = (props) => {
|
|
|
15454
15801
|
onChange && onChange(callbackParams);
|
|
15455
15802
|
};
|
|
15456
15803
|
const selectedExist = (prevExistAdd, item, copyExistAdd) => {
|
|
15457
|
-
console.log(prevExistAdd, item, copyExistAdd);
|
|
15458
15804
|
setSelectedExistAddress(item);
|
|
15459
15805
|
onSelected && onSelected(prevExistAdd, item, copyExistAdd);
|
|
15460
15806
|
handClose();
|
|
@@ -15466,7 +15812,6 @@ const Address = (props) => {
|
|
|
15466
15812
|
[tabName[i]]: {}
|
|
15467
15813
|
});
|
|
15468
15814
|
}
|
|
15469
|
-
console.log(selectedRegion);
|
|
15470
15815
|
};
|
|
15471
15816
|
const closeFun = () => {
|
|
15472
15817
|
const resCopy = {
|
|
@@ -15475,7 +15820,11 @@ const Address = (props) => {
|
|
|
15475
15820
|
...selectedRegion
|
|
15476
15821
|
};
|
|
15477
15822
|
const res = {
|
|
15478
|
-
data: {
|
|
15823
|
+
data: {
|
|
15824
|
+
addressIdStr: "",
|
|
15825
|
+
addressStr: "",
|
|
15826
|
+
...selectedRegion
|
|
15827
|
+
},
|
|
15479
15828
|
type: privateType
|
|
15480
15829
|
};
|
|
15481
15830
|
if (privateType === "custom" || privateType === "custom2") {
|
|
@@ -15547,6 +15896,7 @@ const Address = (props) => {
|
|
|
15547
15896
|
style: { ...style },
|
|
15548
15897
|
...rest
|
|
15549
15898
|
}, headerRender(), (privateType === "custom" || privateType === "custom2") && /* @__PURE__ */ React__default.createElement(CustomRender, {
|
|
15899
|
+
modelValue: modelSelect,
|
|
15550
15900
|
type: privateType,
|
|
15551
15901
|
province,
|
|
15552
15902
|
city,
|
|
@@ -16028,4 +16378,4 @@ const TimeSelect = (props) => {
|
|
|
16028
16378
|
};
|
|
16029
16379
|
TimeSelect.defaultProps = defaultProps;
|
|
16030
16380
|
TimeSelect.displayName = "NutTimeSelect";
|
|
16031
|
-
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 };
|