@nutui/nutui-react-taro 1.3.12 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/esm/Address.js +5 -5
- package/dist/esm/Audio.js +5 -5
- package/dist/esm/AvatarGroup.js +4 -4
- package/dist/esm/Calendar.js +5 -5
- package/dist/esm/CalendarItem.js +4 -4
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Cell.js +2 -2
- package/dist/esm/ConfigProvider.js +3 -3
- package/dist/esm/CountDown.js +4 -4
- package/dist/esm/DatePicker.js +5 -5
- package/dist/esm/Dialog.js +4 -4
- package/dist/esm/Empty.js +4 -4
- package/dist/esm/FixedNav.js +4 -4
- package/dist/esm/Form.js +4 -4
- package/dist/esm/Grid.js +4 -4
- package/dist/esm/GridItem.js +4 -4
- package/dist/esm/Image/style/index.js +2 -0
- package/dist/esm/Image.js +8 -0
- package/dist/esm/Infiniteloading.js +4 -4
- package/dist/esm/Input.js +4 -4
- package/dist/esm/MenuItem.js +4 -4
- package/dist/esm/NumberKeyboard.js +4 -4
- package/dist/esm/Pagination.js +4 -4
- package/dist/esm/Picker.js +4 -4
- package/dist/esm/PullToRefresh.js +4 -4
- package/dist/esm/Range.js +4 -4
- package/dist/esm/SearchBar.js +4 -4
- package/dist/esm/ShortPassword.js +4 -4
- package/dist/esm/SideNavBar.js +4 -4
- package/dist/esm/Signature.js +4 -4
- package/dist/esm/Sticky.js +4 -4
- package/dist/esm/Table.js +4 -4
- package/dist/esm/TextArea.js +4 -4
- package/dist/esm/TimeDetail.js +4 -4
- package/dist/esm/TimePannel.js +4 -4
- package/dist/esm/TimeSelect.js +6 -6
- package/dist/esm/TrendArrow/style/index.js +2 -0
- package/dist/esm/TrendArrow.js +6 -0
- package/dist/esm/Uploader.js +4 -4
- package/dist/esm/VirtualList.js +4 -4
- package/dist/esm/WaterMark/style/index.js +2 -0
- package/dist/esm/WaterMark.js +9 -0
- package/dist/esm/{address.taro-8d642b4a.js → address.taro-5e5bdac3.js} +2 -2
- package/dist/esm/{audio.taro-6920085d.js → audio.taro-ba2f6d01.js} +2 -2
- package/dist/esm/{avatargroup-5b2584d9.js → avatargroup-94384671.js} +1 -1
- package/dist/esm/{calendar.taro-0a8cbd0c.js → calendar.taro-355827c6.js} +2 -2
- package/dist/esm/{calendaritem.taro-3a12e7f2.js → calendaritem.taro-45d428b9.js} +1 -1
- package/dist/esm/{cascader.taro-8c9891b4.js → cascader.taro-459f7d45.js} +13 -2
- package/dist/esm/{cell.taro-1f034402.js → cell.taro-cf50c4f2.js} +7 -5
- package/dist/esm/{configprovider-3e87d67a.js → configprovider-c5b2fa7f.js} +1 -1
- package/dist/esm/{configprovider.taro-6c7b3056.js → configprovider.taro-3838604b.js} +1 -1
- package/dist/esm/{countdown.taro-f2d9ffed.js → countdown.taro-c9a93845.js} +1 -1
- package/dist/esm/{datepicker.taro-9f8afe51.js → datepicker.taro-4a3249c6.js} +1 -1
- package/dist/esm/{dialog.taro-17e19e5e.js → dialog.taro-78bb9f20.js} +1 -1
- package/dist/esm/{empty.taro-ab9c4f03.js → empty.taro-b69b51fb.js} +1 -1
- package/dist/esm/{fixednav.taro-582322a1.js → fixednav.taro-7f01a850.js} +1 -1
- package/dist/esm/{form.taro-e086758a.js → form.taro-111f816d.js} +1 -1
- package/dist/esm/{grid.taro-5d75c0ad.js → grid.taro-d244170c.js} +1 -1
- package/dist/esm/{griditem.taro-ca62dbb5.js → griditem.taro-f7ee189b.js} +1 -1
- package/dist/esm/image.taro-3464cdbe.js +105 -0
- package/dist/esm/{infiniteloading.taro-9701755f.js → infiniteloading.taro-b2f06309.js} +1 -1
- package/dist/esm/{input.taro-14380bc6.js → input.taro-63918b1f.js} +1 -1
- package/dist/esm/{menuitem.taro-bb55f482.js → menuitem.taro-f110c04a.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-53c350b8.js → numberkeyboard.taro-8ff8d319.js} +1 -1
- package/dist/esm/nutui-react.es.js +41 -38
- package/dist/esm/{pagination.taro-62bbd23f.js → pagination.taro-6fbed587.js} +1 -1
- package/dist/esm/{picker.taro-f003b725.js → picker.taro-715409a3.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-fe2fa54c.js → pulltorefresh.taro-92ad45af.js} +1 -1
- package/dist/esm/{range.taro-4e5f8f31.js → range.taro-062fc2f0.js} +1 -1
- package/dist/esm/{searchbar.taro-0d3c0081.js → searchbar.taro-7347bd21.js} +1 -1
- package/dist/esm/{shortpassword.taro-2e96ca22.js → shortpassword.taro-e75c0b88.js} +1 -1
- package/dist/esm/{sidenavbar.taro-4297f552.js → sidenavbar.taro-8e999f21.js} +1 -1
- package/dist/esm/{signature.taro-6589435b.js → signature.taro-a4f4b45a.js} +1 -1
- package/dist/esm/{sticky.taro-30d4e453.js → sticky.taro-f35f365b.js} +1 -1
- package/dist/esm/{table.taro-7ac89a6c.js → table.taro-96be07f2.js} +1 -1
- package/dist/esm/{textarea.taro-e1bf7f4d.js → textarea.taro-b5fc010b.js} +1 -1
- package/dist/esm/{timedetail.taro-519808cf.js → timedetail.taro-d5b32ecb.js} +1 -1
- package/dist/esm/{timepannel.taro-9904f6e6.js → timepannel.taro-38ff5c77.js} +1 -1
- package/dist/esm/{timeselect.taro-8c4439a8.js → timeselect.taro-f3972356.js} +3 -3
- package/dist/esm/trendarrow.taro-5a7153e4.js +100 -0
- package/dist/esm/types/src/locales/base.d.ts +3 -0
- package/dist/esm/types/src/packages/address/address.d.ts +2 -2
- package/dist/esm/types/src/packages/address/address.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/audio/audio.d.ts +2 -2
- package/dist/esm/types/src/packages/audio/audio.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +2 -2
- package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/backtop/backtop.d.ts +2 -2
- package/dist/esm/types/src/packages/backtop/backtop.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/badge/badge.d.ts +2 -2
- package/dist/esm/types/src/packages/badge/badge.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/button/button.d.ts +2 -2
- package/dist/esm/types/src/packages/button/button.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/cascader/cascader.d.ts +2 -0
- package/dist/esm/types/src/packages/cascader/cascader.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/cascader/cascaderItem.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascaderItem.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/cell/cell.d.ts +2 -2
- package/dist/esm/types/src/packages/cell/cell.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/esm/types/src/packages/checkbox/checkbox.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/circleprogress/circleprogress.d.ts +1 -1
- package/dist/esm/types/src/packages/circleprogress/circleprogress.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/collapseitem/collapseitem.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -2
- package/dist/esm/types/src/packages/fixednav/fixednav.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/form/form.d.ts +2 -2
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +2 -2
- package/dist/esm/types/src/packages/griditem/griditem.d.ts +2 -2
- package/dist/esm/types/src/packages/griditem/griditem.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/image/__test__/image.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/image/demo.d.ts +3 -0
- package/dist/esm/types/src/packages/image/image.d.ts +23 -0
- package/dist/esm/types/src/packages/image/image.taro.d.ts +23 -0
- package/dist/esm/types/src/packages/image/index.d.ts +2 -0
- package/dist/esm/types/src/packages/image/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +2 -2
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/menu/menu.d.ts +2 -2
- package/dist/esm/types/src/packages/menu/menu.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +2 -2
- package/dist/esm/types/src/packages/menuitem/menuitem.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/navbar/navbar.d.ts +2 -2
- package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -2
- package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +4 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +7 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +3 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +7 -1
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +3 -0
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +4 -1
- package/dist/esm/types/src/packages/picker/pickerSlot.d.ts +2 -2
- package/dist/esm/types/src/packages/picker/pickerSlot.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/progress/progress.d.ts +2 -2
- package/dist/esm/types/src/packages/progress/progress.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/radio/radio.d.ts +2 -2
- package/dist/esm/types/src/packages/radio/radio.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/rate/rate.d.ts +2 -2
- package/dist/esm/types/src/packages/rate/rate.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +2 -2
- package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +2 -2
- package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/step/step.d.ts +2 -2
- package/dist/esm/types/src/packages/step/step.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/sticky/sticky.d.ts +2 -2
- package/dist/esm/types/src/packages/tabbaritem/tabbaritem.d.ts +2 -2
- package/dist/esm/types/src/packages/tabbaritem/tabbaritem.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/table/table.d.ts +2 -2
- package/dist/esm/types/src/packages/table/table.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/table/types.d.ts +2 -2
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +2 -2
- package/dist/esm/types/src/packages/tabs/tabs.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/tag/tag.d.ts +2 -2
- package/dist/esm/types/src/packages/tag/tag.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/trendarrow/__test__/trendarrow.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/trendarrow/demo.d.ts +4 -0
- package/dist/esm/types/src/packages/trendarrow/index.d.ts +2 -0
- package/dist/esm/types/src/packages/trendarrow/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +18 -0
- package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +18 -0
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +2 -2
- package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/utils.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/watermark/__tests__/watermark.spec.d.ts +2 -0
- package/dist/esm/types/src/packages/watermark/demo.d.ts +4 -0
- package/dist/esm/types/src/packages/watermark/index.d.ts +2 -0
- package/dist/esm/types/src/packages/watermark/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/watermark/watermark.d.ts +22 -0
- package/dist/esm/types/src/packages/watermark/watermark.taro.d.ts +22 -0
- package/dist/esm/types/src/utils/typings.d.ts +1 -1
- package/dist/esm/{uploader.taro-2e16bff6.js → uploader.taro-568b7ab5.js} +1 -1
- package/dist/esm/{virtuallist.taro-e3035825.js → virtuallist.taro-f97ca13a.js} +1 -1
- package/dist/esm/watermark.taro-7aab4afb.js +120 -0
- package/dist/esm/{zh-CN-14165629.js → zh-CN-dfc384d0.js} +3 -0
- package/dist/locales/base.d.ts +3 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +4 -1
- package/dist/locales/id-ID.js +4 -1
- package/dist/locales/zh-CN.js +4 -1
- package/dist/locales/zh-TW.js +4 -1
- package/dist/nutui.react.es.js +557 -248
- package/dist/nutui.react.umd.js +559 -247
- package/dist/packages/cascader/cascader.scss +1 -1
- package/dist/packages/image/image.scss +51 -0
- package/dist/packages/trendarrow/trendarrow.scss +17 -0
- package/dist/packages/watermark/watermark.scss +13 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +4 -2
- package/dist/styles/font/demo_index.html +51 -5
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +65 -62
- package/dist/styles/font/iconfont.json +14 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +3 -0
- package/dist/styles/variables.scss +4 -0
- package/dist/types/index.d.ts +110 -42
- package/dist/types/nutui.taro.react.build.ts +7 -1
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react
|
|
2
|
+
* @nutui/nutui-react v1.3.13 Wed Nov 30 2022 17:53:16 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
classname.exports = classname_production_min;
|
|
88
88
|
}
|
|
89
89
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
90
|
-
const defaultProps$
|
|
90
|
+
const defaultProps$1u = {
|
|
91
91
|
name: "",
|
|
92
92
|
size: "",
|
|
93
93
|
classPrefix: "nut-icon",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
onClick,
|
|
116
116
|
...rest
|
|
117
117
|
} = {
|
|
118
|
-
...defaultProps$
|
|
118
|
+
...defaultProps$1u,
|
|
119
119
|
...props
|
|
120
120
|
};
|
|
121
121
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -149,13 +149,13 @@
|
|
|
149
149
|
children
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
|
-
Icon$1.defaultProps = defaultProps$
|
|
152
|
+
Icon$1.defaultProps = defaultProps$1u;
|
|
153
153
|
Icon$1.displayName = "NutIcon";
|
|
154
154
|
const ComponentDefaults = {
|
|
155
155
|
iconClassPrefix: "nut-icon",
|
|
156
156
|
iconFontClassName: "nutui-iconfont"
|
|
157
157
|
};
|
|
158
|
-
const defaultProps$
|
|
158
|
+
const defaultProps$1t = {
|
|
159
159
|
...ComponentDefaults,
|
|
160
160
|
className: "",
|
|
161
161
|
color: "",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
iconFontClassName,
|
|
192
192
|
...rest
|
|
193
193
|
} = {
|
|
194
|
-
...defaultProps$
|
|
194
|
+
...defaultProps$1t,
|
|
195
195
|
...props
|
|
196
196
|
};
|
|
197
197
|
const getStyle = React.useCallback(() => {
|
|
@@ -270,9 +270,9 @@
|
|
|
270
270
|
className: icon || loading ? "text" : ""
|
|
271
271
|
}, children)));
|
|
272
272
|
};
|
|
273
|
-
Button.defaultProps = defaultProps$
|
|
273
|
+
Button.defaultProps = defaultProps$1t;
|
|
274
274
|
Button.displayName = "NutButton";
|
|
275
|
-
const defaultProps$
|
|
275
|
+
const defaultProps$1s = {
|
|
276
276
|
...ComponentDefaults,
|
|
277
277
|
title: null,
|
|
278
278
|
subTitle: null,
|
|
@@ -318,14 +318,16 @@
|
|
|
318
318
|
iconFontClassName,
|
|
319
319
|
...rest
|
|
320
320
|
} = {
|
|
321
|
-
...defaultProps$
|
|
321
|
+
...defaultProps$1s,
|
|
322
322
|
...props
|
|
323
323
|
};
|
|
324
324
|
const b2 = cn("cell");
|
|
325
325
|
const handleClick2 = (event) => {
|
|
326
326
|
onClick(event);
|
|
327
327
|
const link = to2 || url;
|
|
328
|
-
|
|
328
|
+
if (link) {
|
|
329
|
+
replace ? Taro__default["default"].redirectTo({ url: link }) : Taro__default["default"].navigateTo({ url: link });
|
|
330
|
+
}
|
|
329
331
|
};
|
|
330
332
|
const baseStyle = {
|
|
331
333
|
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : `${roundRadius}px`
|
|
@@ -367,9 +369,9 @@
|
|
|
367
369
|
className: b2("link")
|
|
368
370
|
}) : linkSlot));
|
|
369
371
|
};
|
|
370
|
-
Cell$1.defaultProps = defaultProps$
|
|
372
|
+
Cell$1.defaultProps = defaultProps$1s;
|
|
371
373
|
Cell$1.displayName = "NutCell";
|
|
372
|
-
const defaultProps$
|
|
374
|
+
const defaultProps$1r = {
|
|
373
375
|
title: "",
|
|
374
376
|
desc: "",
|
|
375
377
|
className: "",
|
|
@@ -378,7 +380,7 @@
|
|
|
378
380
|
};
|
|
379
381
|
const CellGroup = (props) => {
|
|
380
382
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
381
|
-
...defaultProps$
|
|
383
|
+
...defaultProps$1r,
|
|
382
384
|
...props
|
|
383
385
|
};
|
|
384
386
|
const b2 = cn("cell-group");
|
|
@@ -392,7 +394,7 @@
|
|
|
392
394
|
className: b2("wrap")
|
|
393
395
|
}, children));
|
|
394
396
|
};
|
|
395
|
-
CellGroup.defaultProps = defaultProps$
|
|
397
|
+
CellGroup.defaultProps = defaultProps$1r;
|
|
396
398
|
CellGroup.displayName = "NutCellGroup";
|
|
397
399
|
var classnames = { exports: {} };
|
|
398
400
|
/*!
|
|
@@ -1039,7 +1041,7 @@
|
|
|
1039
1041
|
};
|
|
1040
1042
|
CSSTransition.propTypes = {};
|
|
1041
1043
|
var CSSTransition$1 = CSSTransition;
|
|
1042
|
-
const defaultProps$
|
|
1044
|
+
const defaultProps$1q = {
|
|
1043
1045
|
...ComponentDefaults,
|
|
1044
1046
|
position: "center",
|
|
1045
1047
|
transition: "",
|
|
@@ -1225,7 +1227,7 @@
|
|
|
1225
1227
|
}, [position]);
|
|
1226
1228
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1227
1229
|
};
|
|
1228
|
-
Popup.defaultProps = defaultProps$
|
|
1230
|
+
Popup.defaultProps = defaultProps$1q;
|
|
1229
1231
|
Popup.displayName = "NutPopup";
|
|
1230
1232
|
const zhCN = {
|
|
1231
1233
|
save: "\u4FDD\u5B58",
|
|
@@ -1350,9 +1352,12 @@
|
|
|
1350
1352
|
canReleaseText: "\u677E\u5F00\u5237\u65B0",
|
|
1351
1353
|
refreshingText: "\u52A0\u8F7D\u4E2D...",
|
|
1352
1354
|
completeText: "\u5237\u65B0\u6210\u529F"
|
|
1355
|
+
},
|
|
1356
|
+
watermark: {
|
|
1357
|
+
errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
|
|
1353
1358
|
}
|
|
1354
1359
|
};
|
|
1355
|
-
const defaultProps$
|
|
1360
|
+
const defaultProps$1p = {
|
|
1356
1361
|
locale: zhCN
|
|
1357
1362
|
};
|
|
1358
1363
|
const defaultConfigRef$1 = {
|
|
@@ -1369,7 +1374,7 @@
|
|
|
1369
1374
|
};
|
|
1370
1375
|
const ConfigContext$1 = React.createContext(null);
|
|
1371
1376
|
const ConfigProvider = (props) => {
|
|
1372
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
1377
|
+
const { children, ...config2 } = { ...defaultProps$1p, ...props };
|
|
1373
1378
|
const parentConfig = useConfig$1();
|
|
1374
1379
|
return /* @__PURE__ */ React__default["default"].createElement(ConfigContext$1.Provider, {
|
|
1375
1380
|
value: {
|
|
@@ -1378,19 +1383,110 @@
|
|
|
1378
1383
|
}
|
|
1379
1384
|
}, children);
|
|
1380
1385
|
};
|
|
1381
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
1386
|
+
ConfigProvider.defaultProps = defaultProps$1p;
|
|
1382
1387
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1383
|
-
const defaultProps$
|
|
1388
|
+
const defaultProps$1o = {
|
|
1389
|
+
fit: "fill",
|
|
1390
|
+
position: "center",
|
|
1391
|
+
alt: "",
|
|
1392
|
+
width: "center",
|
|
1393
|
+
height: "",
|
|
1394
|
+
round: false,
|
|
1395
|
+
showError: true,
|
|
1396
|
+
showLoading: true
|
|
1397
|
+
};
|
|
1398
|
+
const Image = (props) => {
|
|
1399
|
+
useConfig$1();
|
|
1400
|
+
const {
|
|
1401
|
+
children,
|
|
1402
|
+
className,
|
|
1403
|
+
style,
|
|
1404
|
+
src,
|
|
1405
|
+
fit,
|
|
1406
|
+
position,
|
|
1407
|
+
alt,
|
|
1408
|
+
width,
|
|
1409
|
+
height,
|
|
1410
|
+
round,
|
|
1411
|
+
radius,
|
|
1412
|
+
showError,
|
|
1413
|
+
showLoading,
|
|
1414
|
+
slotError,
|
|
1415
|
+
slotLoding,
|
|
1416
|
+
onClick,
|
|
1417
|
+
onLoad,
|
|
1418
|
+
onError
|
|
1419
|
+
} = { ...defaultProps$1o, ...props };
|
|
1420
|
+
const [loading, setLoading] = React.useState(true);
|
|
1421
|
+
const [isError, setIsError] = React.useState(false);
|
|
1422
|
+
React.useEffect(() => {
|
|
1423
|
+
if (src) {
|
|
1424
|
+
setIsError(false);
|
|
1425
|
+
setLoading(true);
|
|
1426
|
+
}
|
|
1427
|
+
}, [src]);
|
|
1428
|
+
const load = () => {
|
|
1429
|
+
setLoading(false);
|
|
1430
|
+
onLoad && onLoad();
|
|
1431
|
+
};
|
|
1432
|
+
const error = () => {
|
|
1433
|
+
setIsError(true);
|
|
1434
|
+
setLoading(false);
|
|
1435
|
+
onError && onError();
|
|
1436
|
+
};
|
|
1437
|
+
const pxCheck2 = (value) => {
|
|
1438
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1439
|
+
};
|
|
1440
|
+
const stylebox = {
|
|
1441
|
+
height: height ? pxCheck2(height) : "",
|
|
1442
|
+
width: width ? pxCheck2(width) : "",
|
|
1443
|
+
overflow: radius !== void 0 && radius !== null ? "hidden" : "",
|
|
1444
|
+
borderRadius: radius !== void 0 && radius !== null ? pxCheck2(radius) : ""
|
|
1445
|
+
};
|
|
1446
|
+
const styles = {
|
|
1447
|
+
objectFit: fit,
|
|
1448
|
+
objectPosition: position,
|
|
1449
|
+
...style
|
|
1450
|
+
};
|
|
1451
|
+
const imageClick = (event) => {
|
|
1452
|
+
onClick && onClick(event);
|
|
1453
|
+
};
|
|
1454
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1455
|
+
className: `nut-image ${round ? "nut-image-round" : ""}`,
|
|
1456
|
+
style: stylebox,
|
|
1457
|
+
onClick: (e2) => {
|
|
1458
|
+
imageClick(e2);
|
|
1459
|
+
}
|
|
1460
|
+
}, /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
1461
|
+
className: "nut-img",
|
|
1462
|
+
style: styles,
|
|
1463
|
+
src,
|
|
1464
|
+
alt,
|
|
1465
|
+
onLoad: load,
|
|
1466
|
+
onError: error
|
|
1467
|
+
}), showLoading && loading ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1468
|
+
className: "nut-img-loading"
|
|
1469
|
+
}, slotLoding || children || /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
|
|
1470
|
+
name: "image"
|
|
1471
|
+
})) : null, showError && isError && !loading ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1472
|
+
className: "nut-img-error"
|
|
1473
|
+
}, slotError || children || /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
|
|
1474
|
+
name: "image-error"
|
|
1475
|
+
})) : null);
|
|
1476
|
+
};
|
|
1477
|
+
Image.defaultProps = defaultProps$1o;
|
|
1478
|
+
Image.displayName = "NutImage";
|
|
1479
|
+
const defaultProps$1n = {};
|
|
1384
1480
|
const Layout = (props) => {
|
|
1385
|
-
({ ...defaultProps$
|
|
1481
|
+
({ ...defaultProps$1n, ...props });
|
|
1386
1482
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1387
1483
|
className: "nut-layout"
|
|
1388
1484
|
}, "Layout");
|
|
1389
1485
|
};
|
|
1390
|
-
Layout.defaultProps = defaultProps$
|
|
1486
|
+
Layout.defaultProps = defaultProps$1n;
|
|
1391
1487
|
Layout.displayName = "NutLayout";
|
|
1392
1488
|
const DataContext$2 = React.createContext({});
|
|
1393
|
-
const defaultProps$
|
|
1489
|
+
const defaultProps$1m = {
|
|
1394
1490
|
span: "24",
|
|
1395
1491
|
offset: "0",
|
|
1396
1492
|
gutter: "0"
|
|
@@ -1404,7 +1500,7 @@
|
|
|
1404
1500
|
children,
|
|
1405
1501
|
onClick
|
|
1406
1502
|
} = {
|
|
1407
|
-
...defaultProps$
|
|
1503
|
+
...defaultProps$1m,
|
|
1408
1504
|
...props
|
|
1409
1505
|
};
|
|
1410
1506
|
const [colName, setColName] = React.useState("");
|
|
@@ -1432,9 +1528,9 @@
|
|
|
1432
1528
|
}
|
|
1433
1529
|
}, children);
|
|
1434
1530
|
};
|
|
1435
|
-
Col.defaultProps = defaultProps$
|
|
1531
|
+
Col.defaultProps = defaultProps$1m;
|
|
1436
1532
|
Col.displayName = "NutCol";
|
|
1437
|
-
const defaultProps$
|
|
1533
|
+
const defaultProps$1l = {
|
|
1438
1534
|
type: "",
|
|
1439
1535
|
justify: "start",
|
|
1440
1536
|
align: "flex-start",
|
|
@@ -1453,7 +1549,7 @@
|
|
|
1453
1549
|
gutter,
|
|
1454
1550
|
onClick
|
|
1455
1551
|
} = {
|
|
1456
|
-
...defaultProps$
|
|
1552
|
+
...defaultProps$1l,
|
|
1457
1553
|
...props
|
|
1458
1554
|
};
|
|
1459
1555
|
const prefixCls = "nut-row";
|
|
@@ -1488,9 +1584,9 @@
|
|
|
1488
1584
|
children
|
|
1489
1585
|
));
|
|
1490
1586
|
};
|
|
1491
|
-
Row.defaultProps = defaultProps$
|
|
1587
|
+
Row.defaultProps = defaultProps$1l;
|
|
1492
1588
|
Row.displayName = "NutRow";
|
|
1493
|
-
const defaultProps$
|
|
1589
|
+
const defaultProps$1k = {
|
|
1494
1590
|
contentPosition: "center",
|
|
1495
1591
|
dashed: false,
|
|
1496
1592
|
hairline: true,
|
|
@@ -1507,7 +1603,7 @@
|
|
|
1507
1603
|
direction,
|
|
1508
1604
|
...rest
|
|
1509
1605
|
} = {
|
|
1510
|
-
...defaultProps$
|
|
1606
|
+
...defaultProps$1k,
|
|
1511
1607
|
...props
|
|
1512
1608
|
};
|
|
1513
1609
|
const dividerBem = cn("divider");
|
|
@@ -1528,9 +1624,9 @@
|
|
|
1528
1624
|
...rest
|
|
1529
1625
|
}, children);
|
|
1530
1626
|
};
|
|
1531
|
-
Divider.defaultProps = defaultProps$
|
|
1627
|
+
Divider.defaultProps = defaultProps$1k;
|
|
1532
1628
|
Divider.displayName = "NutDivider";
|
|
1533
|
-
const defaultProps$
|
|
1629
|
+
const defaultProps$1j = {
|
|
1534
1630
|
columnNum: 4,
|
|
1535
1631
|
border: true,
|
|
1536
1632
|
gutter: 0,
|
|
@@ -1557,7 +1653,7 @@
|
|
|
1557
1653
|
iconColor,
|
|
1558
1654
|
className,
|
|
1559
1655
|
...rest
|
|
1560
|
-
} = { ...defaultProps$
|
|
1656
|
+
} = { ...defaultProps$1j, ...props };
|
|
1561
1657
|
const childrenDom = React__default["default"].Children.toArray(children);
|
|
1562
1658
|
const pxCheck2 = (value) => {
|
|
1563
1659
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1596,9 +1692,9 @@
|
|
|
1596
1692
|
});
|
|
1597
1693
|
}));
|
|
1598
1694
|
};
|
|
1599
|
-
Grid.defaultProps = defaultProps$
|
|
1695
|
+
Grid.defaultProps = defaultProps$1j;
|
|
1600
1696
|
Grid.displayName = "NutGrid";
|
|
1601
|
-
const defaultProps$
|
|
1697
|
+
const defaultProps$1i = {
|
|
1602
1698
|
...ComponentDefaults,
|
|
1603
1699
|
text: "",
|
|
1604
1700
|
icon: "",
|
|
@@ -1637,7 +1733,7 @@
|
|
|
1637
1733
|
onClick,
|
|
1638
1734
|
...rest
|
|
1639
1735
|
} = {
|
|
1640
|
-
...defaultProps$
|
|
1736
|
+
...defaultProps$1i,
|
|
1641
1737
|
...props
|
|
1642
1738
|
};
|
|
1643
1739
|
const b2 = cn("grid-item");
|
|
@@ -1685,7 +1781,7 @@
|
|
|
1685
1781
|
className: "nut-grid-item__text"
|
|
1686
1782
|
}, text), children && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children)));
|
|
1687
1783
|
};
|
|
1688
|
-
GridItem.defaultProps = defaultProps$
|
|
1784
|
+
GridItem.defaultProps = defaultProps$1i;
|
|
1689
1785
|
GridItem.displayName = "NutGridItem";
|
|
1690
1786
|
const defaultConfigRef = {
|
|
1691
1787
|
current: {
|
|
@@ -1700,17 +1796,17 @@
|
|
|
1700
1796
|
return (_a = React.useContext(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1701
1797
|
};
|
|
1702
1798
|
const ConfigContext = React.createContext(null);
|
|
1703
|
-
const defaultProps$
|
|
1799
|
+
const defaultProps$1h = {};
|
|
1704
1800
|
const Sticky = (props) => {
|
|
1705
1801
|
useConfig();
|
|
1706
|
-
({ ...defaultProps$
|
|
1802
|
+
({ ...defaultProps$1h, ...props });
|
|
1707
1803
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1708
1804
|
className: "nut-sticky"
|
|
1709
1805
|
}, "Sticky");
|
|
1710
1806
|
};
|
|
1711
|
-
Sticky.defaultProps = defaultProps$
|
|
1807
|
+
Sticky.defaultProps = defaultProps$1h;
|
|
1712
1808
|
Sticky.displayName = "NutSticky";
|
|
1713
|
-
const defaultProps$
|
|
1809
|
+
const defaultProps$1g = {
|
|
1714
1810
|
...ComponentDefaults,
|
|
1715
1811
|
title: "",
|
|
1716
1812
|
desc: "",
|
|
@@ -1746,7 +1842,7 @@
|
|
|
1746
1842
|
iconClassPrefix,
|
|
1747
1843
|
iconFontClassName
|
|
1748
1844
|
} = {
|
|
1749
|
-
...defaultProps$
|
|
1845
|
+
...defaultProps$1g,
|
|
1750
1846
|
...props
|
|
1751
1847
|
};
|
|
1752
1848
|
const b2 = cn("navbar");
|
|
@@ -1815,9 +1911,9 @@
|
|
|
1815
1911
|
className: `${b2("")}--placeholder`
|
|
1816
1912
|
}, renderWrapper()) : renderWrapper());
|
|
1817
1913
|
};
|
|
1818
|
-
NavBar.defaultProps = defaultProps$
|
|
1914
|
+
NavBar.defaultProps = defaultProps$1g;
|
|
1819
1915
|
NavBar.displayName = "NutNavBar";
|
|
1820
|
-
const defaultProps$
|
|
1916
|
+
const defaultProps$1f = {
|
|
1821
1917
|
...ComponentDefaults,
|
|
1822
1918
|
fixednavClass: "nut-fixednav",
|
|
1823
1919
|
activeText: "",
|
|
@@ -1847,7 +1943,7 @@
|
|
|
1847
1943
|
iconFontClassName,
|
|
1848
1944
|
...rest
|
|
1849
1945
|
} = {
|
|
1850
|
-
...defaultProps$
|
|
1946
|
+
...defaultProps$1f,
|
|
1851
1947
|
...props
|
|
1852
1948
|
};
|
|
1853
1949
|
const b2 = cn("fixednav");
|
|
@@ -1902,9 +1998,9 @@
|
|
|
1902
1998
|
className: "text"
|
|
1903
1999
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
1904
2000
|
};
|
|
1905
|
-
FixedNav.defaultProps = defaultProps$
|
|
2001
|
+
FixedNav.defaultProps = defaultProps$1f;
|
|
1906
2002
|
FixedNav.displayName = "NutFixedNav";
|
|
1907
|
-
const defaultProps$
|
|
2003
|
+
const defaultProps$1e = {
|
|
1908
2004
|
visible: 0,
|
|
1909
2005
|
bottom: false,
|
|
1910
2006
|
size: 20,
|
|
@@ -1932,7 +2028,7 @@
|
|
|
1932
2028
|
tabSwitch,
|
|
1933
2029
|
onSwitch
|
|
1934
2030
|
} = {
|
|
1935
|
-
...defaultProps$
|
|
2031
|
+
...defaultProps$1e,
|
|
1936
2032
|
...props
|
|
1937
2033
|
};
|
|
1938
2034
|
const b2 = cn("tabbar");
|
|
@@ -1968,9 +2064,9 @@
|
|
|
1968
2064
|
return React__default["default"].cloneElement(child, childProps);
|
|
1969
2065
|
}));
|
|
1970
2066
|
};
|
|
1971
|
-
Tabbar.defaultProps = defaultProps$
|
|
2067
|
+
Tabbar.defaultProps = defaultProps$1e;
|
|
1972
2068
|
Tabbar.displayName = "NutTabbar";
|
|
1973
|
-
const defaultProps$
|
|
2069
|
+
const defaultProps$1d = {
|
|
1974
2070
|
...ComponentDefaults,
|
|
1975
2071
|
dot: false,
|
|
1976
2072
|
size: "",
|
|
@@ -2006,7 +2102,7 @@
|
|
|
2006
2102
|
iconClassPrefix,
|
|
2007
2103
|
iconFontClassName
|
|
2008
2104
|
} = {
|
|
2009
|
-
...defaultProps$
|
|
2105
|
+
...defaultProps$1d,
|
|
2010
2106
|
...props
|
|
2011
2107
|
};
|
|
2012
2108
|
const b2 = cn("tabbar-item");
|
|
@@ -2056,7 +2152,7 @@
|
|
|
2056
2152
|
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
|
|
2057
2153
|
var index_cjs = require$$0;
|
|
2058
2154
|
const elevatorContext = React.createContext({});
|
|
2059
|
-
const defaultProps$
|
|
2155
|
+
const defaultProps$1c = {
|
|
2060
2156
|
height: "200px",
|
|
2061
2157
|
acceptKey: "title",
|
|
2062
2158
|
indexList: [],
|
|
@@ -2079,7 +2175,7 @@
|
|
|
2079
2175
|
children,
|
|
2080
2176
|
...rest
|
|
2081
2177
|
} = {
|
|
2082
|
-
...defaultProps$
|
|
2178
|
+
...defaultProps$1c,
|
|
2083
2179
|
...props
|
|
2084
2180
|
};
|
|
2085
2181
|
const b2 = cn("elevator");
|
|
@@ -2279,9 +2375,9 @@
|
|
|
2279
2375
|
}, item[acceptKey]);
|
|
2280
2376
|
}))));
|
|
2281
2377
|
};
|
|
2282
|
-
Elevator.defaultProps = defaultProps$
|
|
2378
|
+
Elevator.defaultProps = defaultProps$1c;
|
|
2283
2379
|
Elevator.displayName = "NutElevator";
|
|
2284
|
-
const defaultProps$
|
|
2380
|
+
const defaultProps$1b = {
|
|
2285
2381
|
defaultValue: 1,
|
|
2286
2382
|
mode: "multi",
|
|
2287
2383
|
prevText: "",
|
|
@@ -2298,7 +2394,7 @@
|
|
|
2298
2394
|
};
|
|
2299
2395
|
const Pagination = (props) => {
|
|
2300
2396
|
const { locale } = useConfig$1();
|
|
2301
|
-
({ ...defaultProps$
|
|
2397
|
+
({ ...defaultProps$1b, ...props });
|
|
2302
2398
|
const {
|
|
2303
2399
|
modelValue,
|
|
2304
2400
|
mode,
|
|
@@ -2415,7 +2511,7 @@
|
|
|
2415
2511
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2416
2512
|
}, nextText || locale.pagination.next));
|
|
2417
2513
|
};
|
|
2418
|
-
Pagination.defaultProps = defaultProps$
|
|
2514
|
+
Pagination.defaultProps = defaultProps$1b;
|
|
2419
2515
|
Pagination.displayName = "NutPagination";
|
|
2420
2516
|
class Title {
|
|
2421
2517
|
constructor() {
|
|
@@ -2425,7 +2521,7 @@
|
|
|
2425
2521
|
this.index = 0;
|
|
2426
2522
|
}
|
|
2427
2523
|
}
|
|
2428
|
-
const defaultProps$
|
|
2524
|
+
const defaultProps$1a = {
|
|
2429
2525
|
...ComponentDefaults,
|
|
2430
2526
|
tabStyle: {},
|
|
2431
2527
|
value: 0,
|
|
@@ -2466,7 +2562,7 @@
|
|
|
2466
2562
|
iconFontClassName,
|
|
2467
2563
|
...rest
|
|
2468
2564
|
} = {
|
|
2469
|
-
...defaultProps$
|
|
2565
|
+
...defaultProps$1a,
|
|
2470
2566
|
...props
|
|
2471
2567
|
};
|
|
2472
2568
|
const [currentItem, setCurrentItem] = React.useState({ index: 0 });
|
|
@@ -2584,9 +2680,9 @@
|
|
|
2584
2680
|
return React__default["default"].cloneElement(child, childProps);
|
|
2585
2681
|
}))));
|
|
2586
2682
|
};
|
|
2587
|
-
Tabs.defaultProps = defaultProps$
|
|
2683
|
+
Tabs.defaultProps = defaultProps$1a;
|
|
2588
2684
|
Tabs.displayName = "NutTabs";
|
|
2589
|
-
const defaultProps$
|
|
2685
|
+
const defaultProps$19 = {
|
|
2590
2686
|
title: "",
|
|
2591
2687
|
paneKey: "",
|
|
2592
2688
|
activeKey: "",
|
|
@@ -2594,7 +2690,7 @@
|
|
|
2594
2690
|
};
|
|
2595
2691
|
const TabPane = (props) => {
|
|
2596
2692
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
2597
|
-
...defaultProps$
|
|
2693
|
+
...defaultProps$19,
|
|
2598
2694
|
...props
|
|
2599
2695
|
};
|
|
2600
2696
|
const b2 = cn("tabpane");
|
|
@@ -2610,7 +2706,7 @@
|
|
|
2610
2706
|
className: classes
|
|
2611
2707
|
}, children);
|
|
2612
2708
|
};
|
|
2613
|
-
const defaultProps$
|
|
2709
|
+
const defaultProps$18 = {
|
|
2614
2710
|
size: 3,
|
|
2615
2711
|
current: 1,
|
|
2616
2712
|
block: false,
|
|
@@ -2630,7 +2726,7 @@
|
|
|
2630
2726
|
vertical,
|
|
2631
2727
|
...rest
|
|
2632
2728
|
} = {
|
|
2633
|
-
...defaultProps$
|
|
2729
|
+
...defaultProps$18,
|
|
2634
2730
|
...props
|
|
2635
2731
|
};
|
|
2636
2732
|
const b2 = cn("indicator");
|
|
@@ -2664,7 +2760,7 @@
|
|
|
2664
2760
|
...rest
|
|
2665
2761
|
}, renderEles());
|
|
2666
2762
|
};
|
|
2667
|
-
Indicator.defaultProps = defaultProps$
|
|
2763
|
+
Indicator.defaultProps = defaultProps$18;
|
|
2668
2764
|
Indicator.displayName = "NutIndicator";
|
|
2669
2765
|
const handleClick = (e2) => {
|
|
2670
2766
|
e2.stopPropagation();
|
|
@@ -2680,7 +2776,7 @@
|
|
|
2680
2776
|
}
|
|
2681
2777
|
};
|
|
2682
2778
|
const OffsetContext = React.createContext(20);
|
|
2683
|
-
const defaultProps$
|
|
2779
|
+
const defaultProps$17 = {
|
|
2684
2780
|
showhead: false,
|
|
2685
2781
|
position: "left",
|
|
2686
2782
|
width: "80%"
|
|
@@ -2698,7 +2794,7 @@
|
|
|
2698
2794
|
onClose,
|
|
2699
2795
|
...rest
|
|
2700
2796
|
} = {
|
|
2701
|
-
...defaultProps$
|
|
2797
|
+
...defaultProps$17,
|
|
2702
2798
|
...props
|
|
2703
2799
|
};
|
|
2704
2800
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -2726,14 +2822,14 @@
|
|
|
2726
2822
|
className: "nut-sidenavbar__content"
|
|
2727
2823
|
}, children))))));
|
|
2728
2824
|
};
|
|
2729
|
-
SideNavBar.defaultProps = defaultProps$
|
|
2825
|
+
SideNavBar.defaultProps = defaultProps$17;
|
|
2730
2826
|
SideNavBar.displayName = "NutSideNavBar";
|
|
2731
|
-
const defaultProps$
|
|
2827
|
+
const defaultProps$16 = {
|
|
2732
2828
|
open: true
|
|
2733
2829
|
};
|
|
2734
2830
|
const SubSideNavBar = (props) => {
|
|
2735
2831
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
2736
|
-
...defaultProps$
|
|
2832
|
+
...defaultProps$16,
|
|
2737
2833
|
...props
|
|
2738
2834
|
};
|
|
2739
2835
|
const offset = React.useContext(OffsetContext);
|
|
@@ -2804,7 +2900,7 @@
|
|
|
2804
2900
|
...rest
|
|
2805
2901
|
}, title);
|
|
2806
2902
|
};
|
|
2807
|
-
const defaultProps$
|
|
2903
|
+
const defaultProps$15 = {
|
|
2808
2904
|
...ComponentDefaults,
|
|
2809
2905
|
className: "",
|
|
2810
2906
|
style: {},
|
|
@@ -2827,7 +2923,7 @@
|
|
|
2827
2923
|
iconFontClassName,
|
|
2828
2924
|
...rest
|
|
2829
2925
|
} = {
|
|
2830
|
-
...defaultProps$
|
|
2926
|
+
...defaultProps$15,
|
|
2831
2927
|
...props
|
|
2832
2928
|
};
|
|
2833
2929
|
const parentRef = React.useRef(null);
|
|
@@ -2924,9 +3020,9 @@
|
|
|
2924
3020
|
})));
|
|
2925
3021
|
})), cloneChildren()));
|
|
2926
3022
|
};
|
|
2927
|
-
Menu.defaultProps = defaultProps$
|
|
3023
|
+
Menu.defaultProps = defaultProps$15;
|
|
2928
3024
|
Menu.displayName = "NutMenu";
|
|
2929
|
-
const defaultProps$
|
|
3025
|
+
const defaultProps$14 = {
|
|
2930
3026
|
...ComponentDefaults,
|
|
2931
3027
|
className: "",
|
|
2932
3028
|
style: {},
|
|
@@ -2941,7 +3037,7 @@
|
|
|
2941
3037
|
};
|
|
2942
3038
|
const MenuItem = React.forwardRef((props, ref) => {
|
|
2943
3039
|
useConfig$1();
|
|
2944
|
-
const mergedProps = { ...defaultProps$
|
|
3040
|
+
const mergedProps = { ...defaultProps$14, ...props };
|
|
2945
3041
|
const {
|
|
2946
3042
|
style,
|
|
2947
3043
|
options,
|
|
@@ -2957,7 +3053,7 @@
|
|
|
2957
3053
|
iconClassPrefix,
|
|
2958
3054
|
iconFontClassName
|
|
2959
3055
|
} = {
|
|
2960
|
-
...defaultProps$
|
|
3056
|
+
...defaultProps$14,
|
|
2961
3057
|
...props
|
|
2962
3058
|
};
|
|
2963
3059
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -3078,7 +3174,7 @@
|
|
|
3078
3174
|
}, item.text));
|
|
3079
3175
|
}), children))));
|
|
3080
3176
|
});
|
|
3081
|
-
MenuItem.defaultProps = defaultProps$
|
|
3177
|
+
MenuItem.defaultProps = defaultProps$14;
|
|
3082
3178
|
MenuItem.displayName = "NutMenuItem";
|
|
3083
3179
|
const MIN_DISTANCE = 10;
|
|
3084
3180
|
function getDirection(x2, y2) {
|
|
@@ -3149,7 +3245,7 @@
|
|
|
3149
3245
|
const res = await element.getBoundingClientRect();
|
|
3150
3246
|
return res;
|
|
3151
3247
|
};
|
|
3152
|
-
const defaultProps$
|
|
3248
|
+
const defaultProps$13 = {
|
|
3153
3249
|
name: "",
|
|
3154
3250
|
size: "",
|
|
3155
3251
|
classPrefix: "nut-icon",
|
|
@@ -3177,7 +3273,7 @@
|
|
|
3177
3273
|
onClick,
|
|
3178
3274
|
...rest
|
|
3179
3275
|
} = {
|
|
3180
|
-
...defaultProps$
|
|
3276
|
+
...defaultProps$13,
|
|
3181
3277
|
...props
|
|
3182
3278
|
};
|
|
3183
3279
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -3211,9 +3307,9 @@
|
|
|
3211
3307
|
children
|
|
3212
3308
|
);
|
|
3213
3309
|
}
|
|
3214
|
-
Icon.defaultProps = defaultProps$
|
|
3310
|
+
Icon.defaultProps = defaultProps$13;
|
|
3215
3311
|
Icon.displayName = "NutIcon";
|
|
3216
|
-
const defaultProps$
|
|
3312
|
+
const defaultProps$12 = {
|
|
3217
3313
|
id: "",
|
|
3218
3314
|
style: {},
|
|
3219
3315
|
icon: null,
|
|
@@ -3258,7 +3354,7 @@
|
|
|
3258
3354
|
visible,
|
|
3259
3355
|
onClose,
|
|
3260
3356
|
...rest
|
|
3261
|
-
} = { ...defaultProps$
|
|
3357
|
+
} = { ...defaultProps$12, ...props };
|
|
3262
3358
|
let timer;
|
|
3263
3359
|
const [openState, SetOpenState] = React.useState(false);
|
|
3264
3360
|
React.useEffect(() => {
|
|
@@ -3347,9 +3443,9 @@
|
|
|
3347
3443
|
className: toastBem("text")
|
|
3348
3444
|
}, msg))) : null);
|
|
3349
3445
|
};
|
|
3350
|
-
Toast.defaultProps = defaultProps$
|
|
3446
|
+
Toast.defaultProps = defaultProps$12;
|
|
3351
3447
|
Toast.displayName = "NutToast";
|
|
3352
|
-
const defaultProps
|
|
3448
|
+
const defaultProps$11 = {
|
|
3353
3449
|
range: false,
|
|
3354
3450
|
hiddenRange: false,
|
|
3355
3451
|
hiddenTag: false,
|
|
@@ -3386,8 +3482,8 @@
|
|
|
3386
3482
|
minDesc,
|
|
3387
3483
|
maxDesc,
|
|
3388
3484
|
curValueDesc
|
|
3389
|
-
} = { ...defaultProps
|
|
3390
|
-
let { min, max, step } = { ...defaultProps
|
|
3485
|
+
} = { ...defaultProps$11, ...props };
|
|
3486
|
+
let { min, max, step } = { ...defaultProps$11, ...props };
|
|
3391
3487
|
min = Number(min);
|
|
3392
3488
|
max = Number(max);
|
|
3393
3489
|
step = Number(step);
|
|
@@ -3738,7 +3834,7 @@
|
|
|
3738
3834
|
}
|
|
3739
3835
|
}));
|
|
3740
3836
|
};
|
|
3741
|
-
Range.defaultProps = defaultProps
|
|
3837
|
+
Range.defaultProps = defaultProps$11;
|
|
3742
3838
|
Range.displayName = "NutRange";
|
|
3743
3839
|
const Utils = {
|
|
3744
3840
|
isLeapYear(y2) {
|
|
@@ -3832,7 +3928,7 @@
|
|
|
3832
3928
|
};
|
|
3833
3929
|
}
|
|
3834
3930
|
var requestAniFrame$1 = requestAniFrame();
|
|
3835
|
-
const defaultProps$
|
|
3931
|
+
const defaultProps$10 = {
|
|
3836
3932
|
type: "one",
|
|
3837
3933
|
isAutoBackFill: false,
|
|
3838
3934
|
poppable: true,
|
|
@@ -3861,7 +3957,7 @@
|
|
|
3861
3957
|
onChoose,
|
|
3862
3958
|
onUpdate,
|
|
3863
3959
|
onClose
|
|
3864
|
-
} = { ...defaultProps$
|
|
3960
|
+
} = { ...defaultProps$10, ...props };
|
|
3865
3961
|
const weeks = locale.calendaritem.weekdays;
|
|
3866
3962
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
3867
3963
|
const [unLoadPrev, setUnLoadPrev] = React.useState(false);
|
|
@@ -4285,9 +4381,9 @@
|
|
|
4285
4381
|
onClick: confirm
|
|
4286
4382
|
}, locale.confirm)) : ""));
|
|
4287
4383
|
};
|
|
4288
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4384
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
4289
4385
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4290
|
-
const defaultProps
|
|
4386
|
+
const defaultProps$$ = {
|
|
4291
4387
|
type: "one",
|
|
4292
4388
|
isAutoBackFill: false,
|
|
4293
4389
|
poppable: true,
|
|
@@ -4315,7 +4411,7 @@
|
|
|
4315
4411
|
endDate,
|
|
4316
4412
|
onClose,
|
|
4317
4413
|
onChoose
|
|
4318
|
-
} = { ...defaultProps
|
|
4414
|
+
} = { ...defaultProps$$, ...props };
|
|
4319
4415
|
const close = () => {
|
|
4320
4416
|
onClose && onClose();
|
|
4321
4417
|
};
|
|
@@ -4361,9 +4457,9 @@
|
|
|
4361
4457
|
onChoose: choose
|
|
4362
4458
|
}));
|
|
4363
4459
|
};
|
|
4364
|
-
Calendar.defaultProps = defaultProps
|
|
4460
|
+
Calendar.defaultProps = defaultProps$$;
|
|
4365
4461
|
Calendar.displayName = "NutCalendar";
|
|
4366
|
-
const defaultProps$
|
|
4462
|
+
const defaultProps$_ = {
|
|
4367
4463
|
disabled: false,
|
|
4368
4464
|
checkedValue: [],
|
|
4369
4465
|
max: void 0,
|
|
@@ -4373,7 +4469,7 @@
|
|
|
4373
4469
|
};
|
|
4374
4470
|
const CheckboxGroup = React__default["default"].forwardRef(
|
|
4375
4471
|
(props, ref) => {
|
|
4376
|
-
const { children } = { ...defaultProps$
|
|
4472
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
4377
4473
|
const b2 = cn("checkboxgroup");
|
|
4378
4474
|
const {
|
|
4379
4475
|
className,
|
|
@@ -4480,9 +4576,9 @@
|
|
|
4480
4576
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
|
|
4481
4577
|
}
|
|
4482
4578
|
);
|
|
4483
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4579
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
4484
4580
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4485
|
-
const defaultProps$
|
|
4581
|
+
const defaultProps$Z = {
|
|
4486
4582
|
...ComponentDefaults,
|
|
4487
4583
|
checked: false,
|
|
4488
4584
|
disabled: false,
|
|
@@ -4498,7 +4594,7 @@
|
|
|
4498
4594
|
};
|
|
4499
4595
|
const Checkbox = (props) => {
|
|
4500
4596
|
const { children } = {
|
|
4501
|
-
...defaultProps$
|
|
4597
|
+
...defaultProps$Z,
|
|
4502
4598
|
...props
|
|
4503
4599
|
};
|
|
4504
4600
|
const b2 = cn("checkbox");
|
|
@@ -4580,7 +4676,7 @@
|
|
|
4580
4676
|
onClick: handleClick2
|
|
4581
4677
|
}, renderIcon(), renderLabel());
|
|
4582
4678
|
};
|
|
4583
|
-
Checkbox.defaultProps = defaultProps$
|
|
4679
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
4584
4680
|
Checkbox.displayName = "NutCheckBox";
|
|
4585
4681
|
Checkbox.Group = CheckboxGroup;
|
|
4586
4682
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -5027,7 +5123,7 @@
|
|
|
5027
5123
|
};
|
|
5028
5124
|
const Picker = React__default["default"].forwardRef(InternalPicker);
|
|
5029
5125
|
const currentYear = new Date().getFullYear();
|
|
5030
|
-
const defaultProps$
|
|
5126
|
+
const defaultProps$Y = {
|
|
5031
5127
|
modelValue: null,
|
|
5032
5128
|
visible: false,
|
|
5033
5129
|
title: "",
|
|
@@ -5058,7 +5154,7 @@
|
|
|
5058
5154
|
style,
|
|
5059
5155
|
...rest
|
|
5060
5156
|
} = {
|
|
5061
|
-
...defaultProps$
|
|
5157
|
+
...defaultProps$Y,
|
|
5062
5158
|
...props
|
|
5063
5159
|
};
|
|
5064
5160
|
const [show, setShow] = React.useState(false);
|
|
@@ -5323,9 +5419,9 @@
|
|
|
5323
5419
|
ref: pickerRef
|
|
5324
5420
|
}));
|
|
5325
5421
|
};
|
|
5326
|
-
DatePicker.defaultProps = defaultProps$
|
|
5422
|
+
DatePicker.defaultProps = defaultProps$Y;
|
|
5327
5423
|
DatePicker.displayName = "NutDatePicker";
|
|
5328
|
-
const defaultProps$
|
|
5424
|
+
const defaultProps$X = {
|
|
5329
5425
|
...ComponentDefaults,
|
|
5330
5426
|
disabled: false,
|
|
5331
5427
|
buttonSize: "",
|
|
@@ -5372,7 +5468,7 @@
|
|
|
5372
5468
|
iconFontClassName,
|
|
5373
5469
|
...restProps
|
|
5374
5470
|
} = {
|
|
5375
|
-
...defaultProps$
|
|
5471
|
+
...defaultProps$X,
|
|
5376
5472
|
...props
|
|
5377
5473
|
};
|
|
5378
5474
|
const [inputValue, setInputValue] = React.useState(modelValue);
|
|
@@ -5508,7 +5604,7 @@
|
|
|
5508
5604
|
onClick: addNumber
|
|
5509
5605
|
}));
|
|
5510
5606
|
};
|
|
5511
|
-
InputNumber.defaultProps = defaultProps$
|
|
5607
|
+
InputNumber.defaultProps = defaultProps$X;
|
|
5512
5608
|
InputNumber.displayName = "NutInputNumber";
|
|
5513
5609
|
function trimExtraChar(value, char, regExp) {
|
|
5514
5610
|
const index = value.indexOf(char);
|
|
@@ -5534,7 +5630,7 @@
|
|
|
5534
5630
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5535
5631
|
return value.replace(regExp, "");
|
|
5536
5632
|
}
|
|
5537
|
-
const defaultProps$
|
|
5633
|
+
const defaultProps$W = {
|
|
5538
5634
|
...ComponentDefaults,
|
|
5539
5635
|
type: "text",
|
|
5540
5636
|
name: "",
|
|
@@ -5631,7 +5727,7 @@
|
|
|
5631
5727
|
iconFontClassName,
|
|
5632
5728
|
...rest
|
|
5633
5729
|
} = {
|
|
5634
|
-
...defaultProps$
|
|
5730
|
+
...defaultProps$W,
|
|
5635
5731
|
...props
|
|
5636
5732
|
};
|
|
5637
5733
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -5862,14 +5958,14 @@
|
|
|
5862
5958
|
}
|
|
5863
5959
|
}, errorMessage) : null)));
|
|
5864
5960
|
});
|
|
5865
|
-
Input.defaultProps = defaultProps$
|
|
5961
|
+
Input.defaultProps = defaultProps$W;
|
|
5866
5962
|
Input.displayName = "NutInput";
|
|
5867
5963
|
const radioContext = {
|
|
5868
5964
|
onChange: (val) => {
|
|
5869
5965
|
}
|
|
5870
5966
|
};
|
|
5871
5967
|
var RadioContext = React__default["default"].createContext(radioContext);
|
|
5872
|
-
const defaultProps$
|
|
5968
|
+
const defaultProps$V = {
|
|
5873
5969
|
value: null,
|
|
5874
5970
|
textPosition: "right",
|
|
5875
5971
|
onChange: (value) => {
|
|
@@ -5879,7 +5975,7 @@
|
|
|
5879
5975
|
};
|
|
5880
5976
|
const RadioGroup = React__default["default"].forwardRef(
|
|
5881
5977
|
(props, ref) => {
|
|
5882
|
-
const { children } = { ...defaultProps$
|
|
5978
|
+
const { children } = { ...defaultProps$V, ...props };
|
|
5883
5979
|
cn("RadioGroup");
|
|
5884
5980
|
const {
|
|
5885
5981
|
className,
|
|
@@ -5944,9 +6040,9 @@
|
|
|
5944
6040
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
|
|
5945
6041
|
}
|
|
5946
6042
|
);
|
|
5947
|
-
RadioGroup.defaultProps = defaultProps$
|
|
6043
|
+
RadioGroup.defaultProps = defaultProps$V;
|
|
5948
6044
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5949
|
-
const defaultProps$
|
|
6045
|
+
const defaultProps$U = {
|
|
5950
6046
|
...ComponentDefaults,
|
|
5951
6047
|
disabled: false,
|
|
5952
6048
|
checked: false,
|
|
@@ -5961,7 +6057,7 @@
|
|
|
5961
6057
|
};
|
|
5962
6058
|
const Radio$1 = (props) => {
|
|
5963
6059
|
const { children } = {
|
|
5964
|
-
...defaultProps$
|
|
6060
|
+
...defaultProps$U,
|
|
5965
6061
|
...props
|
|
5966
6062
|
};
|
|
5967
6063
|
const {
|
|
@@ -6041,11 +6137,11 @@
|
|
|
6041
6137
|
...rest
|
|
6042
6138
|
}, renderRadioItem());
|
|
6043
6139
|
};
|
|
6044
|
-
Radio$1.defaultProps = defaultProps$
|
|
6140
|
+
Radio$1.defaultProps = defaultProps$U;
|
|
6045
6141
|
Radio$1.displayName = "NutRadio";
|
|
6046
6142
|
Radio$1.RadioGroup = RadioGroup;
|
|
6047
6143
|
var Radio = Radio$1;
|
|
6048
|
-
const defaultProps$
|
|
6144
|
+
const defaultProps$T = {
|
|
6049
6145
|
...ComponentDefaults,
|
|
6050
6146
|
count: 5,
|
|
6051
6147
|
modelValue: 0,
|
|
@@ -6080,7 +6176,7 @@
|
|
|
6080
6176
|
iconClassPrefix,
|
|
6081
6177
|
iconFontClassName
|
|
6082
6178
|
} = {
|
|
6083
|
-
...defaultProps$
|
|
6179
|
+
...defaultProps$T,
|
|
6084
6180
|
...props
|
|
6085
6181
|
};
|
|
6086
6182
|
const b2 = cn("rate");
|
|
@@ -6147,9 +6243,9 @@
|
|
|
6147
6243
|
}));
|
|
6148
6244
|
}));
|
|
6149
6245
|
};
|
|
6150
|
-
Rate.defaultProps = defaultProps$
|
|
6246
|
+
Rate.defaultProps = defaultProps$T;
|
|
6151
6247
|
Rate.displayName = "NutRate";
|
|
6152
|
-
const defaultProps$
|
|
6248
|
+
const defaultProps$S = {
|
|
6153
6249
|
...ComponentDefaults,
|
|
6154
6250
|
title: "",
|
|
6155
6251
|
desc: "",
|
|
@@ -6317,9 +6413,9 @@
|
|
|
6317
6413
|
onClick: () => sure()
|
|
6318
6414
|
}, locale.confirm)) : null)));
|
|
6319
6415
|
};
|
|
6320
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6416
|
+
ShortPassword.defaultProps = defaultProps$S;
|
|
6321
6417
|
ShortPassword.displayName = "NutShortPassword";
|
|
6322
|
-
const defaultProps$
|
|
6418
|
+
const defaultProps$R = {
|
|
6323
6419
|
defaultValue: "",
|
|
6324
6420
|
textAlign: "left",
|
|
6325
6421
|
limitshow: false,
|
|
@@ -6347,7 +6443,7 @@
|
|
|
6347
6443
|
onChange,
|
|
6348
6444
|
onBlur,
|
|
6349
6445
|
onFocus
|
|
6350
|
-
} = { ...defaultProps$
|
|
6446
|
+
} = { ...defaultProps$R, ...props };
|
|
6351
6447
|
const textareaBem = cn("textarea");
|
|
6352
6448
|
const [inputValue, SetInputValue] = React.useState("");
|
|
6353
6449
|
React.useEffect(() => {
|
|
@@ -6412,9 +6508,9 @@
|
|
|
6412
6508
|
className: textareaBem("limit")
|
|
6413
6509
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6414
6510
|
};
|
|
6415
|
-
TextArea.defaultProps = defaultProps$
|
|
6511
|
+
TextArea.defaultProps = defaultProps$R;
|
|
6416
6512
|
TextArea.displayName = "NutTextArea";
|
|
6417
|
-
const defaultProps$
|
|
6513
|
+
const defaultProps$Q = {
|
|
6418
6514
|
...ComponentDefaults,
|
|
6419
6515
|
className: "",
|
|
6420
6516
|
style: {},
|
|
@@ -6462,7 +6558,7 @@
|
|
|
6462
6558
|
iconFontClassName,
|
|
6463
6559
|
...rest
|
|
6464
6560
|
} = {
|
|
6465
|
-
...defaultProps$
|
|
6561
|
+
...defaultProps$Q,
|
|
6466
6562
|
...props
|
|
6467
6563
|
};
|
|
6468
6564
|
const b2 = cn("progress");
|
|
@@ -6540,7 +6636,7 @@
|
|
|
6540
6636
|
color: iconColor
|
|
6541
6637
|
})));
|
|
6542
6638
|
};
|
|
6543
|
-
Progress.defaultProps = defaultProps$
|
|
6639
|
+
Progress.defaultProps = defaultProps$Q;
|
|
6544
6640
|
Progress.displayName = "NutProgress";
|
|
6545
6641
|
class UploadOptions {
|
|
6546
6642
|
constructor() {
|
|
@@ -6638,7 +6734,7 @@
|
|
|
6638
6734
|
}
|
|
6639
6735
|
}
|
|
6640
6736
|
}
|
|
6641
|
-
const defaultProps$
|
|
6737
|
+
const defaultProps$P = {
|
|
6642
6738
|
...ComponentDefaults,
|
|
6643
6739
|
url: "",
|
|
6644
6740
|
maximum: 9,
|
|
@@ -6710,7 +6806,7 @@
|
|
|
6710
6806
|
onBeforeXhrUpload,
|
|
6711
6807
|
onBeforeDelete,
|
|
6712
6808
|
...restProps
|
|
6713
|
-
} = { ...defaultProps$
|
|
6809
|
+
} = { ...defaultProps$P, ...props };
|
|
6714
6810
|
const [fileList, setFileList] = React.useState([]);
|
|
6715
6811
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
6716
6812
|
React.useEffect(() => {
|
|
@@ -6998,9 +7094,9 @@
|
|
|
6998
7094
|
})));
|
|
6999
7095
|
};
|
|
7000
7096
|
const Uploader = React__default["default"].forwardRef(InternalUploader);
|
|
7001
|
-
Uploader.defaultProps = defaultProps$
|
|
7097
|
+
Uploader.defaultProps = defaultProps$P;
|
|
7002
7098
|
Uploader.displayName = "NutUploader";
|
|
7003
|
-
const defaultProps$
|
|
7099
|
+
const defaultProps$O = {
|
|
7004
7100
|
data: {
|
|
7005
7101
|
text: "",
|
|
7006
7102
|
value: "",
|
|
@@ -7009,13 +7105,14 @@
|
|
|
7009
7105
|
loading: false,
|
|
7010
7106
|
children: []
|
|
7011
7107
|
},
|
|
7108
|
+
activeColor: "#fa2c19",
|
|
7012
7109
|
checked: false,
|
|
7013
7110
|
chooseItem: () => {
|
|
7014
7111
|
}
|
|
7015
7112
|
};
|
|
7016
7113
|
const InternalCascaderItem = (props) => {
|
|
7017
|
-
const { data, checked, chooseItem } = {
|
|
7018
|
-
...defaultProps$
|
|
7114
|
+
const { data, checked, chooseItem, activeColor } = {
|
|
7115
|
+
...defaultProps$O,
|
|
7019
7116
|
...props
|
|
7020
7117
|
};
|
|
7021
7118
|
const b2 = cn("cascader-item");
|
|
@@ -7035,6 +7132,7 @@
|
|
|
7035
7132
|
const initData = () => {
|
|
7036
7133
|
};
|
|
7037
7134
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
7135
|
+
style: { color: checked ? activeColor : "" },
|
|
7038
7136
|
className: classes,
|
|
7039
7137
|
onClick: () => {
|
|
7040
7138
|
chooseItem(data);
|
|
@@ -7051,7 +7149,7 @@
|
|
|
7051
7149
|
}));
|
|
7052
7150
|
};
|
|
7053
7151
|
const CascaderItem = React__default["default"].forwardRef(InternalCascaderItem);
|
|
7054
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7152
|
+
CascaderItem.defaultProps = defaultProps$O;
|
|
7055
7153
|
CascaderItem.displayName = "NutCascaderItem";
|
|
7056
7154
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
7057
7155
|
const {
|
|
@@ -7185,9 +7283,11 @@
|
|
|
7185
7283
|
return pathNodes;
|
|
7186
7284
|
}
|
|
7187
7285
|
}
|
|
7188
|
-
const defaultProps$
|
|
7286
|
+
const defaultProps$N = {
|
|
7189
7287
|
className: "",
|
|
7190
7288
|
style: {},
|
|
7289
|
+
activeColor: "#fa2c19",
|
|
7290
|
+
tabsColor: "",
|
|
7191
7291
|
poppable: true,
|
|
7192
7292
|
visible: false,
|
|
7193
7293
|
options: [],
|
|
@@ -7215,6 +7315,7 @@
|
|
|
7215
7315
|
const {
|
|
7216
7316
|
className,
|
|
7217
7317
|
style,
|
|
7318
|
+
tabsColor,
|
|
7218
7319
|
poppable,
|
|
7219
7320
|
visible,
|
|
7220
7321
|
options,
|
|
@@ -7232,7 +7333,7 @@
|
|
|
7232
7333
|
onClose,
|
|
7233
7334
|
onChange,
|
|
7234
7335
|
onPathChange
|
|
7235
|
-
} = { ...defaultProps$
|
|
7336
|
+
} = { ...defaultProps$N, ...props };
|
|
7236
7337
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
7237
7338
|
const [optiosData, setOptiosData] = React.useState([]);
|
|
7238
7339
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -7456,7 +7557,8 @@
|
|
|
7456
7557
|
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
7457
7558
|
className: "nut-tabs__titles-item__text"
|
|
7458
7559
|
}, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "\u8BF7\u9009\u62E9", !(!state.initLoading && state.panes.length) && "Loading..."), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
7459
|
-
className: "nut-tabs__titles-item__line"
|
|
7560
|
+
className: "nut-tabs__titles-item__line",
|
|
7561
|
+
style: { background: tabsColor }
|
|
7460
7562
|
}));
|
|
7461
7563
|
});
|
|
7462
7564
|
}
|
|
@@ -7491,9 +7593,9 @@
|
|
|
7491
7593
|
}, renderItem()) : renderItem());
|
|
7492
7594
|
};
|
|
7493
7595
|
const Cascader = React__default["default"].forwardRef(InternalCascader);
|
|
7494
|
-
Cascader.defaultProps = defaultProps$
|
|
7596
|
+
Cascader.defaultProps = defaultProps$N;
|
|
7495
7597
|
Cascader.displayName = "NutCascader";
|
|
7496
|
-
const defaultProps$
|
|
7598
|
+
const defaultProps$M = {
|
|
7497
7599
|
...ComponentDefaults,
|
|
7498
7600
|
placeholder: "",
|
|
7499
7601
|
shape: "square",
|
|
@@ -7544,7 +7646,7 @@
|
|
|
7544
7646
|
iconClassPrefix,
|
|
7545
7647
|
iconFontClassName
|
|
7546
7648
|
} = {
|
|
7547
|
-
...defaultProps$
|
|
7649
|
+
...defaultProps$M,
|
|
7548
7650
|
...props
|
|
7549
7651
|
};
|
|
7550
7652
|
const alignClass = `${align}`;
|
|
@@ -7698,9 +7800,9 @@
|
|
|
7698
7800
|
className: "nut-searchbar__input-box"
|
|
7699
7801
|
}, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
7700
7802
|
};
|
|
7701
|
-
SearchBar.defaultProps = defaultProps$
|
|
7803
|
+
SearchBar.defaultProps = defaultProps$M;
|
|
7702
7804
|
SearchBar.displayName = "NutSearchBar";
|
|
7703
|
-
const defaultProps$
|
|
7805
|
+
const defaultProps$L = {
|
|
7704
7806
|
confirmText: "",
|
|
7705
7807
|
title: "",
|
|
7706
7808
|
visible: false,
|
|
@@ -7898,17 +8000,17 @@
|
|
|
7898
8000
|
})
|
|
7899
8001
|
}, confirmText || locale.done))) : null))));
|
|
7900
8002
|
};
|
|
7901
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
8003
|
+
NumberKeyboard.defaultProps = defaultProps$L;
|
|
7902
8004
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7903
|
-
const defaultProps$
|
|
8005
|
+
const defaultProps$K = {};
|
|
7904
8006
|
const Form = (props) => {
|
|
7905
8007
|
useConfig();
|
|
7906
|
-
({ ...defaultProps$
|
|
8008
|
+
({ ...defaultProps$K, ...props });
|
|
7907
8009
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
7908
8010
|
className: "nut-form"
|
|
7909
8011
|
}, "Form");
|
|
7910
8012
|
};
|
|
7911
|
-
Form.defaultProps = defaultProps$
|
|
8013
|
+
Form.defaultProps = defaultProps$K;
|
|
7912
8014
|
Form.displayName = "NutForm";
|
|
7913
8015
|
const FormItemContext = React.createContext({});
|
|
7914
8016
|
function isAbsolute(pathname) {
|
|
@@ -9040,7 +9142,7 @@
|
|
|
9040
9142
|
function useHistory() {
|
|
9041
9143
|
return useContext(historyContext);
|
|
9042
9144
|
}
|
|
9043
|
-
const defaultProps$
|
|
9145
|
+
const defaultProps$J = {
|
|
9044
9146
|
...ComponentDefaults,
|
|
9045
9147
|
title: null,
|
|
9046
9148
|
subTitle: null,
|
|
@@ -9086,7 +9188,7 @@
|
|
|
9086
9188
|
iconFontClassName,
|
|
9087
9189
|
...rest
|
|
9088
9190
|
} = {
|
|
9089
|
-
...defaultProps$
|
|
9191
|
+
...defaultProps$J,
|
|
9090
9192
|
...props
|
|
9091
9193
|
};
|
|
9092
9194
|
const b2 = cn("cell");
|
|
@@ -9140,9 +9242,9 @@
|
|
|
9140
9242
|
className: b2("link")
|
|
9141
9243
|
}) : linkSlot));
|
|
9142
9244
|
};
|
|
9143
|
-
Cell.defaultProps = defaultProps$
|
|
9245
|
+
Cell.defaultProps = defaultProps$J;
|
|
9144
9246
|
Cell.displayName = "NutCell";
|
|
9145
|
-
const defaultProps$
|
|
9247
|
+
const defaultProps$I = {
|
|
9146
9248
|
...ComponentDefaults,
|
|
9147
9249
|
name: "",
|
|
9148
9250
|
label: "",
|
|
@@ -9189,7 +9291,7 @@
|
|
|
9189
9291
|
showErrorLine,
|
|
9190
9292
|
showErrorMessage
|
|
9191
9293
|
} = {
|
|
9192
|
-
...defaultProps$
|
|
9294
|
+
...defaultProps$I,
|
|
9193
9295
|
...this.props
|
|
9194
9296
|
};
|
|
9195
9297
|
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -9238,9 +9340,9 @@
|
|
|
9238
9340
|
return this.renderLayout(returnChildNode);
|
|
9239
9341
|
}
|
|
9240
9342
|
}
|
|
9241
|
-
FormItem.defaultProps = defaultProps$
|
|
9343
|
+
FormItem.defaultProps = defaultProps$I;
|
|
9242
9344
|
FormItem.contextType = FormItemContext;
|
|
9243
|
-
const defaultProps$
|
|
9345
|
+
const defaultProps$H = {
|
|
9244
9346
|
cancelTxt: "",
|
|
9245
9347
|
optionTag: "name",
|
|
9246
9348
|
optionSubTag: "subname",
|
|
@@ -9274,7 +9376,7 @@
|
|
|
9274
9376
|
className,
|
|
9275
9377
|
style,
|
|
9276
9378
|
...rest
|
|
9277
|
-
} = { ...defaultProps$
|
|
9379
|
+
} = { ...defaultProps$H, ...props };
|
|
9278
9380
|
const b2 = cn("actionsheet");
|
|
9279
9381
|
const isHighlight = (item) => {
|
|
9280
9382
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
@@ -9318,9 +9420,9 @@
|
|
|
9318
9420
|
onClick: () => cancelActionSheet()
|
|
9319
9421
|
}, cancelTxt)));
|
|
9320
9422
|
};
|
|
9321
|
-
ActionSheet.defaultProps = defaultProps$
|
|
9423
|
+
ActionSheet.defaultProps = defaultProps$H;
|
|
9322
9424
|
ActionSheet.displayName = "NutActionSheet";
|
|
9323
|
-
const defaultProps$
|
|
9425
|
+
const defaultProps$G = {
|
|
9324
9426
|
...ComponentDefaults,
|
|
9325
9427
|
bottom: 20,
|
|
9326
9428
|
right: 10,
|
|
@@ -9346,7 +9448,7 @@
|
|
|
9346
9448
|
iconClassPrefix,
|
|
9347
9449
|
iconFontClassName
|
|
9348
9450
|
} = {
|
|
9349
|
-
...defaultProps$
|
|
9451
|
+
...defaultProps$G,
|
|
9350
9452
|
...props
|
|
9351
9453
|
};
|
|
9352
9454
|
const [backTop, SetBackTop] = React.useState(false);
|
|
@@ -9380,9 +9482,9 @@
|
|
|
9380
9482
|
name: "top"
|
|
9381
9483
|
})));
|
|
9382
9484
|
};
|
|
9383
|
-
BackTop.defaultProps = defaultProps$
|
|
9485
|
+
BackTop.defaultProps = defaultProps$G;
|
|
9384
9486
|
BackTop.displayName = "NutBackTop";
|
|
9385
|
-
const defaultProps$
|
|
9487
|
+
const defaultProps$F = {
|
|
9386
9488
|
attract: false,
|
|
9387
9489
|
direction: void 0,
|
|
9388
9490
|
boundary: {
|
|
@@ -9395,7 +9497,7 @@
|
|
|
9395
9497
|
};
|
|
9396
9498
|
const Drag = (props) => {
|
|
9397
9499
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
9398
|
-
...defaultProps$
|
|
9500
|
+
...defaultProps$F,
|
|
9399
9501
|
...props
|
|
9400
9502
|
};
|
|
9401
9503
|
const b2 = cn("drag");
|
|
@@ -9487,7 +9589,7 @@
|
|
|
9487
9589
|
style: currstyle
|
|
9488
9590
|
}, children));
|
|
9489
9591
|
};
|
|
9490
|
-
Drag.defaultProps = defaultProps$
|
|
9592
|
+
Drag.defaultProps = defaultProps$F;
|
|
9491
9593
|
Drag.displayName = "NutDrag";
|
|
9492
9594
|
const Content = (props) => {
|
|
9493
9595
|
const {
|
|
@@ -9586,7 +9688,7 @@
|
|
|
9586
9688
|
}));
|
|
9587
9689
|
};
|
|
9588
9690
|
DialogWrapper.displayName = "NutDialogWrapper";
|
|
9589
|
-
const defaultProps$
|
|
9691
|
+
const defaultProps$E = {
|
|
9590
9692
|
okText: "",
|
|
9591
9693
|
cancelText: "",
|
|
9592
9694
|
mask: true,
|
|
@@ -9665,9 +9767,9 @@
|
|
|
9665
9767
|
});
|
|
9666
9768
|
};
|
|
9667
9769
|
const Dialog = React.forwardRef(BaseDialog);
|
|
9668
|
-
Dialog.defaultProps = defaultProps$
|
|
9770
|
+
Dialog.defaultProps = defaultProps$E;
|
|
9669
9771
|
Dialog.displayName = "NutDialog";
|
|
9670
|
-
const defaultProps$
|
|
9772
|
+
const defaultProps$D = {
|
|
9671
9773
|
...ComponentDefaults,
|
|
9672
9774
|
hasMore: true,
|
|
9673
9775
|
upperThreshold: 40,
|
|
@@ -9699,7 +9801,7 @@
|
|
|
9699
9801
|
iconClassPrefix,
|
|
9700
9802
|
iconFontClassName
|
|
9701
9803
|
} = {
|
|
9702
|
-
...defaultProps$
|
|
9804
|
+
...defaultProps$D,
|
|
9703
9805
|
...props
|
|
9704
9806
|
};
|
|
9705
9807
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -9835,9 +9937,9 @@
|
|
|
9835
9937
|
className: "tips"
|
|
9836
9938
|
}, loadMoreTxt || locale.infiniteloading.loadMoreText)));
|
|
9837
9939
|
};
|
|
9838
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
9940
|
+
Infiniteloading.defaultProps = defaultProps$D;
|
|
9839
9941
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
9840
|
-
const defaultProps$
|
|
9942
|
+
const defaultProps$C = {
|
|
9841
9943
|
id: "",
|
|
9842
9944
|
msg: "",
|
|
9843
9945
|
color: "",
|
|
@@ -9870,7 +9972,7 @@
|
|
|
9870
9972
|
onClosed,
|
|
9871
9973
|
onClick,
|
|
9872
9974
|
...rest
|
|
9873
|
-
} = { ...defaultProps$
|
|
9975
|
+
} = { ...defaultProps$C, ...props };
|
|
9874
9976
|
let timer;
|
|
9875
9977
|
const [showNotify, SetShow] = React.useState(false);
|
|
9876
9978
|
React.useEffect(() => {
|
|
@@ -9931,9 +10033,9 @@
|
|
|
9931
10033
|
onClick: clickHandle
|
|
9932
10034
|
}, children || msg)));
|
|
9933
10035
|
};
|
|
9934
|
-
Notify.defaultProps = defaultProps$
|
|
10036
|
+
Notify.defaultProps = defaultProps$C;
|
|
9935
10037
|
Notify.displayName = "NutNotify";
|
|
9936
|
-
const defaultProps$
|
|
10038
|
+
const defaultProps$B = {
|
|
9937
10039
|
isAsync: false,
|
|
9938
10040
|
checked: false,
|
|
9939
10041
|
disable: false,
|
|
@@ -9956,7 +10058,7 @@
|
|
|
9956
10058
|
className,
|
|
9957
10059
|
style
|
|
9958
10060
|
} = {
|
|
9959
|
-
...defaultProps$
|
|
10061
|
+
...defaultProps$B,
|
|
9960
10062
|
...props
|
|
9961
10063
|
};
|
|
9962
10064
|
const [value, setValue] = React.useState(false);
|
|
@@ -9996,7 +10098,7 @@
|
|
|
9996
10098
|
className: `${b2("label")} close`
|
|
9997
10099
|
}, inactiveText))));
|
|
9998
10100
|
};
|
|
9999
|
-
Switch.defaultProps = defaultProps$
|
|
10101
|
+
Switch.defaultProps = defaultProps$B;
|
|
10000
10102
|
Switch.displayName = "NutSwitch";
|
|
10001
10103
|
function preventDefault(event, isStopPropagation) {
|
|
10002
10104
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -10006,7 +10108,7 @@
|
|
|
10006
10108
|
event.stopPropagation();
|
|
10007
10109
|
}
|
|
10008
10110
|
}
|
|
10009
|
-
const defaultProps$
|
|
10111
|
+
const defaultProps$A = {
|
|
10010
10112
|
name: "",
|
|
10011
10113
|
leftWidth: 0,
|
|
10012
10114
|
rightWidth: 0
|
|
@@ -10014,7 +10116,7 @@
|
|
|
10014
10116
|
const Swipe = React.forwardRef((props, instanceRef) => {
|
|
10015
10117
|
const swipeBem = cn("swipe");
|
|
10016
10118
|
const touch = useTouch();
|
|
10017
|
-
const { children, className, style } = { ...defaultProps$
|
|
10119
|
+
const { children, className, style } = { ...defaultProps$A, ...props };
|
|
10018
10120
|
const root = React.useRef();
|
|
10019
10121
|
const opened = React.useRef(false);
|
|
10020
10122
|
const lockClick = React.useRef(false);
|
|
@@ -10167,7 +10269,7 @@
|
|
|
10167
10269
|
style: wrapperStyle
|
|
10168
10270
|
}, renderActionContent("left"), children, renderActionContent("right")));
|
|
10169
10271
|
});
|
|
10170
|
-
Swipe.defaultProps = defaultProps$
|
|
10272
|
+
Swipe.defaultProps = defaultProps$A;
|
|
10171
10273
|
Swipe.displayName = "NutSwipe";
|
|
10172
10274
|
function clamp(v2, min, max) {
|
|
10173
10275
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -14694,7 +14796,7 @@
|
|
|
14694
14796
|
console.log(e2);
|
|
14695
14797
|
}
|
|
14696
14798
|
}
|
|
14697
|
-
const defaultProps$
|
|
14799
|
+
const defaultProps$z = {
|
|
14698
14800
|
pullingText: "",
|
|
14699
14801
|
canReleaseText: "",
|
|
14700
14802
|
refreshingText: "",
|
|
@@ -14709,7 +14811,7 @@
|
|
|
14709
14811
|
const PullToRefresh = (p2) => {
|
|
14710
14812
|
const { locale } = useConfig$1();
|
|
14711
14813
|
const props = {
|
|
14712
|
-
...defaultProps$
|
|
14814
|
+
...defaultProps$z,
|
|
14713
14815
|
...p2,
|
|
14714
14816
|
...{
|
|
14715
14817
|
pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -14847,10 +14949,10 @@
|
|
|
14847
14949
|
className: "nut-pulltorefresh-content"
|
|
14848
14950
|
}, props.children));
|
|
14849
14951
|
};
|
|
14850
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
14952
|
+
PullToRefresh.defaultProps = defaultProps$z;
|
|
14851
14953
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
14852
14954
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
14853
|
-
const defaultProps$
|
|
14955
|
+
const defaultProps$y = {
|
|
14854
14956
|
strokeWidth: 5,
|
|
14855
14957
|
radius: 50,
|
|
14856
14958
|
strokeLinecap: "round",
|
|
@@ -14872,7 +14974,7 @@
|
|
|
14872
14974
|
strokeLinecap,
|
|
14873
14975
|
...restProps
|
|
14874
14976
|
} = {
|
|
14875
|
-
...defaultProps$
|
|
14977
|
+
...defaultProps$y,
|
|
14876
14978
|
...props
|
|
14877
14979
|
};
|
|
14878
14980
|
const [oldValue, setOldValue] = React.useState(progress);
|
|
@@ -14983,9 +15085,9 @@
|
|
|
14983
15085
|
className: "nut-circleprogress-text"
|
|
14984
15086
|
}, children || /* @__PURE__ */ React__default["default"].createElement("div", null, progress, "%")));
|
|
14985
15087
|
};
|
|
14986
|
-
CircleProgress.defaultProps = defaultProps$
|
|
15088
|
+
CircleProgress.defaultProps = defaultProps$y;
|
|
14987
15089
|
CircleProgress.displayName = "NutCircleProgress";
|
|
14988
|
-
const defaultProps$
|
|
15090
|
+
const defaultProps$x = {
|
|
14989
15091
|
...ComponentDefaults,
|
|
14990
15092
|
direction: "across",
|
|
14991
15093
|
list: [],
|
|
@@ -15029,7 +15131,7 @@
|
|
|
15029
15131
|
iconClassPrefix,
|
|
15030
15132
|
iconFontClassName
|
|
15031
15133
|
} = {
|
|
15032
|
-
...defaultProps$
|
|
15134
|
+
...defaultProps$x,
|
|
15033
15135
|
...props
|
|
15034
15136
|
};
|
|
15035
15137
|
const wrap = React.useRef(null);
|
|
@@ -15278,16 +15380,16 @@
|
|
|
15278
15380
|
size: "11px"
|
|
15279
15381
|
}) : null))) : null);
|
|
15280
15382
|
};
|
|
15281
|
-
NoticeBar.defaultProps = defaultProps$
|
|
15383
|
+
NoticeBar.defaultProps = defaultProps$x;
|
|
15282
15384
|
NoticeBar.displayName = "NutNoticeBar";
|
|
15283
15385
|
const DataContext$1 = React.createContext({});
|
|
15284
|
-
const defaultProps$
|
|
15386
|
+
const defaultProps$w = {
|
|
15285
15387
|
current: 0,
|
|
15286
15388
|
direction: "horizontal",
|
|
15287
15389
|
progressDot: false
|
|
15288
15390
|
};
|
|
15289
15391
|
const Steps = (props) => {
|
|
15290
|
-
const propSteps = { ...defaultProps$
|
|
15392
|
+
const propSteps = { ...defaultProps$w, ...props };
|
|
15291
15393
|
const {
|
|
15292
15394
|
children,
|
|
15293
15395
|
current,
|
|
@@ -15321,9 +15423,9 @@
|
|
|
15321
15423
|
children
|
|
15322
15424
|
));
|
|
15323
15425
|
};
|
|
15324
|
-
Steps.defaultProps = defaultProps$
|
|
15426
|
+
Steps.defaultProps = defaultProps$w;
|
|
15325
15427
|
Steps.displayName = "NutSteps";
|
|
15326
|
-
const defaultProps$
|
|
15428
|
+
const defaultProps$v = {
|
|
15327
15429
|
...ComponentDefaults,
|
|
15328
15430
|
title: "",
|
|
15329
15431
|
content: "",
|
|
@@ -15347,7 +15449,7 @@
|
|
|
15347
15449
|
iconFontClassName,
|
|
15348
15450
|
...restProps
|
|
15349
15451
|
} = {
|
|
15350
|
-
...defaultProps$
|
|
15452
|
+
...defaultProps$v,
|
|
15351
15453
|
...props
|
|
15352
15454
|
};
|
|
15353
15455
|
const parent = React.useContext(DataContext$1);
|
|
@@ -15409,10 +15511,10 @@
|
|
|
15409
15511
|
className: "nut-step-content"
|
|
15410
15512
|
}, renderContent())));
|
|
15411
15513
|
};
|
|
15412
|
-
Step.defaultProps = defaultProps$
|
|
15514
|
+
Step.defaultProps = defaultProps$v;
|
|
15413
15515
|
Step.displayName = "NutStep";
|
|
15414
15516
|
const DataContext = React.createContext({});
|
|
15415
|
-
const defaultProps$
|
|
15517
|
+
const defaultProps$u = {
|
|
15416
15518
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
15417
15519
|
height: 0,
|
|
15418
15520
|
duration: 500,
|
|
@@ -15430,7 +15532,7 @@
|
|
|
15430
15532
|
};
|
|
15431
15533
|
const DISTANCE = 5;
|
|
15432
15534
|
const Swiper = React__default["default"].forwardRef((props, ref) => {
|
|
15433
|
-
const propSwiper = { ...defaultProps$
|
|
15535
|
+
const propSwiper = { ...defaultProps$u, ...props };
|
|
15434
15536
|
const {
|
|
15435
15537
|
children,
|
|
15436
15538
|
direction,
|
|
@@ -15851,13 +15953,13 @@
|
|
|
15851
15953
|
});
|
|
15852
15954
|
})) : /* @__PURE__ */ React__default["default"].createElement("div", null, pageContent)));
|
|
15853
15955
|
});
|
|
15854
|
-
Swiper.defaultProps = defaultProps$
|
|
15956
|
+
Swiper.defaultProps = defaultProps$u;
|
|
15855
15957
|
Swiper.displayName = "NutSwiper";
|
|
15856
|
-
const defaultProps$
|
|
15958
|
+
const defaultProps$t = {
|
|
15857
15959
|
direction: "horizontal"
|
|
15858
15960
|
};
|
|
15859
15961
|
const SwiperItem = React__default["default"].forwardRef((props, ref) => {
|
|
15860
|
-
const _props = { ...defaultProps$
|
|
15962
|
+
const _props = { ...defaultProps$t, ...props };
|
|
15861
15963
|
const { className, style, children, direction, size } = _props;
|
|
15862
15964
|
const parent = React.useContext(DataContext);
|
|
15863
15965
|
const b2 = cn("swiper-item");
|
|
@@ -15876,10 +15978,10 @@
|
|
|
15876
15978
|
style: { ...style, ...getStyle() }
|
|
15877
15979
|
}, children);
|
|
15878
15980
|
});
|
|
15879
|
-
SwiperItem.defaultProps = defaultProps$
|
|
15981
|
+
SwiperItem.defaultProps = defaultProps$t;
|
|
15880
15982
|
SwiperItem.displayName = "NutSwiperItem";
|
|
15881
15983
|
const AvatarContext = React.createContext({});
|
|
15882
|
-
const defaultProps$
|
|
15984
|
+
const defaultProps$s = {
|
|
15883
15985
|
...ComponentDefaults,
|
|
15884
15986
|
size: "",
|
|
15885
15987
|
icon: "",
|
|
@@ -15910,7 +16012,7 @@
|
|
|
15910
16012
|
iconFontClassName,
|
|
15911
16013
|
...rest
|
|
15912
16014
|
} = {
|
|
15913
|
-
...defaultProps$
|
|
16015
|
+
...defaultProps$s,
|
|
15914
16016
|
...props
|
|
15915
16017
|
};
|
|
15916
16018
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -15997,9 +16099,9 @@
|
|
|
15997
16099
|
className: "text"
|
|
15998
16100
|
}, ((_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent) ? (_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxContent : `+ ${avatarIndex - ((_o = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _o.maxCount)}`)));
|
|
15999
16101
|
};
|
|
16000
|
-
Avatar.defaultProps = defaultProps$
|
|
16102
|
+
Avatar.defaultProps = defaultProps$s;
|
|
16001
16103
|
Avatar.displayName = "NutAvatar";
|
|
16002
|
-
const defaultProps$
|
|
16104
|
+
const defaultProps$r = {
|
|
16003
16105
|
maxContent: "",
|
|
16004
16106
|
maxCount: "",
|
|
16005
16107
|
maxBgColor: "#eee",
|
|
@@ -16011,7 +16113,7 @@
|
|
|
16011
16113
|
};
|
|
16012
16114
|
const AvatarGroup = (props) => {
|
|
16013
16115
|
useConfig();
|
|
16014
|
-
const propAvatarGroup = { ...defaultProps$
|
|
16116
|
+
const propAvatarGroup = { ...defaultProps$r, ...props };
|
|
16015
16117
|
const { className, style, children } = propAvatarGroup;
|
|
16016
16118
|
const avatarGroupRef = React.useRef(null);
|
|
16017
16119
|
const b2 = cn("avatar-group");
|
|
@@ -16028,9 +16130,9 @@
|
|
|
16028
16130
|
ref: avatarGroupRef
|
|
16029
16131
|
}, children));
|
|
16030
16132
|
};
|
|
16031
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
16133
|
+
AvatarGroup.defaultProps = defaultProps$r;
|
|
16032
16134
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
16033
|
-
const defaultProps$
|
|
16135
|
+
const defaultProps$q = {
|
|
16034
16136
|
price: 0,
|
|
16035
16137
|
needSymbol: true,
|
|
16036
16138
|
symbol: "¥",
|
|
@@ -16052,7 +16154,7 @@
|
|
|
16052
16154
|
className,
|
|
16053
16155
|
...rest
|
|
16054
16156
|
} = {
|
|
16055
|
-
...defaultProps$
|
|
16157
|
+
...defaultProps$q,
|
|
16056
16158
|
...props
|
|
16057
16159
|
};
|
|
16058
16160
|
const b2 = cn("price");
|
|
@@ -16117,9 +16219,9 @@
|
|
|
16117
16219
|
className: `${b2("decimal")} ${b2(`decimal-${size}`)}`
|
|
16118
16220
|
}, formatDecimal(price)), needSymbol && position === "after" ? renderSymbol() : null);
|
|
16119
16221
|
};
|
|
16120
|
-
Price.defaultProps = defaultProps$
|
|
16222
|
+
Price.defaultProps = defaultProps$q;
|
|
16121
16223
|
Price.displayName = "NutPrice";
|
|
16122
|
-
const defaultProps$
|
|
16224
|
+
const defaultProps$p = {
|
|
16123
16225
|
...ComponentDefaults,
|
|
16124
16226
|
value: "",
|
|
16125
16227
|
dot: false,
|
|
@@ -16144,7 +16246,7 @@
|
|
|
16144
16246
|
iconClassPrefix,
|
|
16145
16247
|
iconFontClassName
|
|
16146
16248
|
} = {
|
|
16147
|
-
...defaultProps$
|
|
16249
|
+
...defaultProps$p,
|
|
16148
16250
|
...props
|
|
16149
16251
|
};
|
|
16150
16252
|
function content() {
|
|
@@ -16182,9 +16284,9 @@
|
|
|
16182
16284
|
style: getStyle()
|
|
16183
16285
|
}, content()));
|
|
16184
16286
|
};
|
|
16185
|
-
Badge.defaultProps = defaultProps$
|
|
16287
|
+
Badge.defaultProps = defaultProps$p;
|
|
16186
16288
|
Badge.displayName = "NutBadge";
|
|
16187
|
-
const defaultProps$
|
|
16289
|
+
const defaultProps$o = {
|
|
16188
16290
|
...ComponentDefaults,
|
|
16189
16291
|
type: "default",
|
|
16190
16292
|
color: "",
|
|
@@ -16217,7 +16319,7 @@
|
|
|
16217
16319
|
iconClassPrefix,
|
|
16218
16320
|
iconFontClassName
|
|
16219
16321
|
} = {
|
|
16220
|
-
...defaultProps$
|
|
16322
|
+
...defaultProps$o,
|
|
16221
16323
|
...props
|
|
16222
16324
|
};
|
|
16223
16325
|
const [btnName, setBtnName] = React.useState("");
|
|
@@ -16291,7 +16393,7 @@
|
|
|
16291
16393
|
className: "text"
|
|
16292
16394
|
}, children)));
|
|
16293
16395
|
};
|
|
16294
|
-
Tag.defaultProps = defaultProps$
|
|
16396
|
+
Tag.defaultProps = defaultProps$o;
|
|
16295
16397
|
Tag.displayName = "NutTag";
|
|
16296
16398
|
function fillRef(ref, node) {
|
|
16297
16399
|
if (typeof ref === "function") {
|
|
@@ -16335,7 +16437,7 @@
|
|
|
16335
16437
|
return trigger;
|
|
16336
16438
|
}
|
|
16337
16439
|
}
|
|
16338
|
-
const defaultProps$
|
|
16440
|
+
const defaultProps$n = {
|
|
16339
16441
|
...ComponentDefaults,
|
|
16340
16442
|
list: [],
|
|
16341
16443
|
theme: "light",
|
|
@@ -16364,7 +16466,7 @@
|
|
|
16364
16466
|
iconFontClassName,
|
|
16365
16467
|
...reset
|
|
16366
16468
|
} = {
|
|
16367
|
-
...defaultProps$
|
|
16469
|
+
...defaultProps$n,
|
|
16368
16470
|
...props
|
|
16369
16471
|
};
|
|
16370
16472
|
const goodItem = React.useRef(null);
|
|
@@ -16459,9 +16561,9 @@
|
|
|
16459
16561
|
style: { background: "transparent" }
|
|
16460
16562
|
}) : "");
|
|
16461
16563
|
};
|
|
16462
|
-
Popover.defaultProps = defaultProps$
|
|
16564
|
+
Popover.defaultProps = defaultProps$n;
|
|
16463
16565
|
Popover.displayName = "NutPopover";
|
|
16464
|
-
const defaultProps$
|
|
16566
|
+
const defaultProps$m = {
|
|
16465
16567
|
width: "100px",
|
|
16466
16568
|
height: "100px",
|
|
16467
16569
|
row: 1,
|
|
@@ -16489,7 +16591,7 @@
|
|
|
16489
16591
|
avatarShape,
|
|
16490
16592
|
...restProps
|
|
16491
16593
|
} = {
|
|
16492
|
-
...defaultProps$
|
|
16594
|
+
...defaultProps$m,
|
|
16493
16595
|
...props
|
|
16494
16596
|
};
|
|
16495
16597
|
const b2 = cn("skeleton");
|
|
@@ -16544,9 +16646,9 @@
|
|
|
16544
16646
|
});
|
|
16545
16647
|
})))));
|
|
16546
16648
|
};
|
|
16547
|
-
Skeleton.defaultProps = defaultProps$
|
|
16649
|
+
Skeleton.defaultProps = defaultProps$m;
|
|
16548
16650
|
Skeleton.displayName = "NutSkeleton";
|
|
16549
|
-
const defaultProps$
|
|
16651
|
+
const defaultProps$l = {
|
|
16550
16652
|
paused: false,
|
|
16551
16653
|
startTime: Date.now(),
|
|
16552
16654
|
endTime: Date.now(),
|
|
@@ -16573,7 +16675,7 @@
|
|
|
16573
16675
|
onUpdate,
|
|
16574
16676
|
children,
|
|
16575
16677
|
...rest
|
|
16576
|
-
} = { ...defaultProps$
|
|
16678
|
+
} = { ...defaultProps$l, ...props };
|
|
16577
16679
|
const b2 = cn("countdown");
|
|
16578
16680
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
16579
16681
|
const stateRef = React.useRef({
|
|
@@ -16769,9 +16871,9 @@
|
|
|
16769
16871
|
}));
|
|
16770
16872
|
};
|
|
16771
16873
|
const CountDown = React__default["default"].forwardRef(InternalCountDown);
|
|
16772
|
-
CountDown.defaultProps = defaultProps$
|
|
16874
|
+
CountDown.defaultProps = defaultProps$l;
|
|
16773
16875
|
CountDown.displayName = "NutCountDown";
|
|
16774
|
-
const defaultProps$
|
|
16876
|
+
const defaultProps$k = {
|
|
16775
16877
|
activeName: ["0"],
|
|
16776
16878
|
accordion: false,
|
|
16777
16879
|
icon: "",
|
|
@@ -16796,7 +16898,7 @@
|
|
|
16796
16898
|
iconColor,
|
|
16797
16899
|
onChange
|
|
16798
16900
|
} = {
|
|
16799
|
-
...defaultProps$
|
|
16901
|
+
...defaultProps$k,
|
|
16800
16902
|
...props
|
|
16801
16903
|
};
|
|
16802
16904
|
const childrenDom = React__default["default"].Children.toArray(children);
|
|
@@ -16854,9 +16956,9 @@
|
|
|
16854
16956
|
},
|
|
16855
16957
|
areEqual
|
|
16856
16958
|
);
|
|
16857
|
-
Collapse.defaultProps = defaultProps$
|
|
16959
|
+
Collapse.defaultProps = defaultProps$k;
|
|
16858
16960
|
Collapse.displayName = "NutCollapse";
|
|
16859
|
-
const defaultProps$
|
|
16961
|
+
const defaultProps$j = {
|
|
16860
16962
|
...ComponentDefaults,
|
|
16861
16963
|
title: "",
|
|
16862
16964
|
name: "",
|
|
@@ -16895,7 +16997,7 @@
|
|
|
16895
16997
|
iconFontClassName,
|
|
16896
16998
|
...rest
|
|
16897
16999
|
} = {
|
|
16898
|
-
...defaultProps$
|
|
17000
|
+
...defaultProps$j,
|
|
16899
17001
|
...props
|
|
16900
17002
|
};
|
|
16901
17003
|
const [domHeight, setDomHeight] = React.useState(-1);
|
|
@@ -16975,9 +17077,9 @@
|
|
|
16975
17077
|
className: colBem("content-text")
|
|
16976
17078
|
}, children)));
|
|
16977
17079
|
};
|
|
16978
|
-
CollapseItem.defaultProps = defaultProps$
|
|
17080
|
+
CollapseItem.defaultProps = defaultProps$j;
|
|
16979
17081
|
CollapseItem.displayName = "NutCollapseItem";
|
|
16980
|
-
const defaultProps$
|
|
17082
|
+
const defaultProps$i = {
|
|
16981
17083
|
maxLen: 0,
|
|
16982
17084
|
endNumber: "",
|
|
16983
17085
|
delaySpeed: 300,
|
|
@@ -16995,7 +17097,7 @@
|
|
|
16995
17097
|
thousands,
|
|
16996
17098
|
...reset
|
|
16997
17099
|
} = {
|
|
16998
|
-
...defaultProps$
|
|
17100
|
+
...defaultProps$i,
|
|
16999
17101
|
...props
|
|
17000
17102
|
};
|
|
17001
17103
|
const b2 = cn("countup");
|
|
@@ -17072,9 +17174,9 @@
|
|
|
17072
17174
|
}, item));
|
|
17073
17175
|
})));
|
|
17074
17176
|
};
|
|
17075
|
-
CountUp.defaultProps = defaultProps$
|
|
17177
|
+
CountUp.defaultProps = defaultProps$i;
|
|
17076
17178
|
CountUp.displayName = "NutCountUp";
|
|
17077
|
-
const defaultProps$
|
|
17179
|
+
const defaultProps$h = {};
|
|
17078
17180
|
class AnimatingNumbers extends React.Component {
|
|
17079
17181
|
constructor(props) {
|
|
17080
17182
|
super(props);
|
|
@@ -17086,7 +17188,7 @@
|
|
|
17086
17188
|
});
|
|
17087
17189
|
}
|
|
17088
17190
|
}
|
|
17089
|
-
AnimatingNumbers.defaultProps = defaultProps$
|
|
17191
|
+
AnimatingNumbers.defaultProps = defaultProps$h;
|
|
17090
17192
|
AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
17091
17193
|
AnimatingNumbers.CountUp = CountUp;
|
|
17092
17194
|
const defaultStatus = {
|
|
@@ -17094,7 +17196,7 @@
|
|
|
17094
17196
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
17095
17197
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
17096
17198
|
};
|
|
17097
|
-
const defaultProps$
|
|
17199
|
+
const defaultProps$g = {
|
|
17098
17200
|
description: "\u65E0\u5185\u5BB9",
|
|
17099
17201
|
image: "empty",
|
|
17100
17202
|
imageSize: "",
|
|
@@ -17102,9 +17204,9 @@
|
|
|
17102
17204
|
};
|
|
17103
17205
|
const Empty = (props) => {
|
|
17104
17206
|
const { locale } = useConfig$1();
|
|
17105
|
-
defaultProps$
|
|
17207
|
+
defaultProps$g.description = locale.noData || defaultProps$g.description;
|
|
17106
17208
|
const { image, imageSize, description, children, className, ...rest } = {
|
|
17107
|
-
...defaultProps$
|
|
17209
|
+
...defaultProps$g,
|
|
17108
17210
|
...props
|
|
17109
17211
|
};
|
|
17110
17212
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -17146,7 +17248,7 @@
|
|
|
17146
17248
|
className: b2("description")
|
|
17147
17249
|
}, description) : { description }, children));
|
|
17148
17250
|
};
|
|
17149
|
-
Empty.defaultProps = defaultProps$
|
|
17251
|
+
Empty.defaultProps = defaultProps$g;
|
|
17150
17252
|
Empty.displayName = "NutEmpty";
|
|
17151
17253
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
17152
17254
|
let index = 0;
|
|
@@ -17259,7 +17361,7 @@
|
|
|
17259
17361
|
}
|
|
17260
17362
|
});
|
|
17261
17363
|
};
|
|
17262
|
-
const defaultProps$
|
|
17364
|
+
const defaultProps$f = {};
|
|
17263
17365
|
const VirtualList = (props) => {
|
|
17264
17366
|
const {
|
|
17265
17367
|
sourceData = [],
|
|
@@ -17423,9 +17525,9 @@
|
|
|
17423
17525
|
}) : data);
|
|
17424
17526
|
}))));
|
|
17425
17527
|
};
|
|
17426
|
-
VirtualList.defaultProps = defaultProps$
|
|
17528
|
+
VirtualList.defaultProps = defaultProps$f;
|
|
17427
17529
|
VirtualList.displayName = "NutVirtualList";
|
|
17428
|
-
const defaultProps$
|
|
17530
|
+
const defaultProps$e = {
|
|
17429
17531
|
...ComponentDefaults,
|
|
17430
17532
|
className: "",
|
|
17431
17533
|
style: {},
|
|
@@ -17437,7 +17539,7 @@
|
|
|
17437
17539
|
};
|
|
17438
17540
|
const Table = (props) => {
|
|
17439
17541
|
const { locale } = useConfig$1();
|
|
17440
|
-
defaultProps$
|
|
17542
|
+
defaultProps$e.noData = locale.noData;
|
|
17441
17543
|
const {
|
|
17442
17544
|
children,
|
|
17443
17545
|
className,
|
|
@@ -17453,7 +17555,7 @@
|
|
|
17453
17555
|
iconFontClassName,
|
|
17454
17556
|
...rest
|
|
17455
17557
|
} = {
|
|
17456
|
-
...defaultProps$
|
|
17558
|
+
...defaultProps$e,
|
|
17457
17559
|
...props
|
|
17458
17560
|
};
|
|
17459
17561
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -17551,9 +17653,9 @@
|
|
|
17551
17653
|
className: "nut-table__nodata__text"
|
|
17552
17654
|
}, noData))));
|
|
17553
17655
|
};
|
|
17554
|
-
Table.defaultProps = defaultProps$
|
|
17656
|
+
Table.defaultProps = defaultProps$e;
|
|
17555
17657
|
Table.displayName = "NutTable";
|
|
17556
|
-
const defaultProps$
|
|
17658
|
+
const defaultProps$d = {
|
|
17557
17659
|
source: {
|
|
17558
17660
|
type: {},
|
|
17559
17661
|
src: ""
|
|
@@ -17581,7 +17683,7 @@
|
|
|
17581
17683
|
onPlayend,
|
|
17582
17684
|
...restProps
|
|
17583
17685
|
} = {
|
|
17584
|
-
...defaultProps$
|
|
17686
|
+
...defaultProps$d,
|
|
17585
17687
|
...props
|
|
17586
17688
|
};
|
|
17587
17689
|
const rootRef = React.useRef(null);
|
|
@@ -17638,11 +17740,11 @@
|
|
|
17638
17740
|
kind: "captions"
|
|
17639
17741
|
})));
|
|
17640
17742
|
};
|
|
17641
|
-
Video.defaultProps = defaultProps$
|
|
17743
|
+
Video.defaultProps = defaultProps$d;
|
|
17642
17744
|
Video.displayName = "NutVideo";
|
|
17643
17745
|
const b = cn("audio");
|
|
17644
17746
|
const warn = console.warn;
|
|
17645
|
-
const defaultProps$
|
|
17747
|
+
const defaultProps$c = {
|
|
17646
17748
|
...ComponentDefaults,
|
|
17647
17749
|
className: "",
|
|
17648
17750
|
url: "",
|
|
@@ -17683,7 +17785,7 @@
|
|
|
17683
17785
|
iconFontClassName,
|
|
17684
17786
|
...rest
|
|
17685
17787
|
} = {
|
|
17686
|
-
...defaultProps$
|
|
17788
|
+
...defaultProps$c,
|
|
17687
17789
|
...props
|
|
17688
17790
|
};
|
|
17689
17791
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -17847,9 +17949,9 @@
|
|
|
17847
17949
|
...rest
|
|
17848
17950
|
}, renderAudio());
|
|
17849
17951
|
};
|
|
17850
|
-
Audio.defaultProps = defaultProps$
|
|
17952
|
+
Audio.defaultProps = defaultProps$c;
|
|
17851
17953
|
Audio.displayName = "NutAudio";
|
|
17852
|
-
const defaultProps$
|
|
17954
|
+
const defaultProps$b = {
|
|
17853
17955
|
images: [],
|
|
17854
17956
|
videos: [],
|
|
17855
17957
|
show: false,
|
|
@@ -18032,8 +18134,215 @@
|
|
|
18032
18134
|
className: "nut-imagepreview-index"
|
|
18033
18135
|
}, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)));
|
|
18034
18136
|
};
|
|
18035
|
-
ImagePreview.defaultProps = defaultProps$
|
|
18137
|
+
ImagePreview.defaultProps = defaultProps$b;
|
|
18036
18138
|
ImagePreview.displayName = "NutImagePreview";
|
|
18139
|
+
const defaultProps$a = {
|
|
18140
|
+
rate: 0,
|
|
18141
|
+
digits: 2,
|
|
18142
|
+
showSign: false,
|
|
18143
|
+
showZero: false,
|
|
18144
|
+
arrowLeft: false,
|
|
18145
|
+
syncTextColor: true,
|
|
18146
|
+
textColor: "#333",
|
|
18147
|
+
riseColor: "#fa2c19",
|
|
18148
|
+
dropColor: "#64b578",
|
|
18149
|
+
iconSize: "12px",
|
|
18150
|
+
upIconName: "triangle-up",
|
|
18151
|
+
downIconName: "triangle-down",
|
|
18152
|
+
className: ""
|
|
18153
|
+
};
|
|
18154
|
+
const TrendArrow = (props) => {
|
|
18155
|
+
const {
|
|
18156
|
+
rate,
|
|
18157
|
+
digits,
|
|
18158
|
+
showSign,
|
|
18159
|
+
showZero,
|
|
18160
|
+
arrowLeft,
|
|
18161
|
+
syncTextColor,
|
|
18162
|
+
textColor,
|
|
18163
|
+
riseColor,
|
|
18164
|
+
dropColor,
|
|
18165
|
+
iconSize,
|
|
18166
|
+
upIconName,
|
|
18167
|
+
downIconName,
|
|
18168
|
+
className,
|
|
18169
|
+
children,
|
|
18170
|
+
...rest
|
|
18171
|
+
} = { ...defaultProps$a, ...props };
|
|
18172
|
+
const b2 = cn("trendarrow");
|
|
18173
|
+
const handleClick2 = () => {
|
|
18174
|
+
};
|
|
18175
|
+
const rateTrend = React.useRef(rate > 0);
|
|
18176
|
+
const myFixed = (num, digit = 2) => {
|
|
18177
|
+
if (Object.is(parseFloat(num), NaN)) {
|
|
18178
|
+
return console.log(`\u4F20\u5165\u7684\u503C\uFF1A${num}\u4E0D\u662F\u4E00\u4E2A\u6570\u5B57`);
|
|
18179
|
+
}
|
|
18180
|
+
num = parseFloat(num);
|
|
18181
|
+
const numPow = Math.pow(10, digit);
|
|
18182
|
+
return (Math.round((num + Number.EPSILON) * numPow) / numPow).toFixed(digit);
|
|
18183
|
+
};
|
|
18184
|
+
const calcStyle = (() => {
|
|
18185
|
+
const arrowColor = rateTrend.current ? riseColor : dropColor;
|
|
18186
|
+
const textEquArrowColor = syncTextColor ? arrowColor : textColor;
|
|
18187
|
+
const style = {
|
|
18188
|
+
color: rate === 0 ? textColor : textEquArrowColor
|
|
18189
|
+
};
|
|
18190
|
+
return style;
|
|
18191
|
+
})();
|
|
18192
|
+
const calcRate = (() => {
|
|
18193
|
+
rateTrend.current = rate > 0;
|
|
18194
|
+
const absRate = Math.abs(rate);
|
|
18195
|
+
if (!showZero && rate === 0) {
|
|
18196
|
+
return "--";
|
|
18197
|
+
}
|
|
18198
|
+
const resultRate = `${showSign && rate !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
|
|
18199
|
+
return resultRate;
|
|
18200
|
+
})();
|
|
18201
|
+
const calcIconProps = (() => {
|
|
18202
|
+
const iconProps = {
|
|
18203
|
+
name: rateTrend.current ? upIconName : downIconName,
|
|
18204
|
+
color: rateTrend.current ? riseColor : dropColor,
|
|
18205
|
+
size: iconSize
|
|
18206
|
+
};
|
|
18207
|
+
return iconProps;
|
|
18208
|
+
})();
|
|
18209
|
+
const renderContent = (arrowLeft2) => {
|
|
18210
|
+
const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
|
|
18211
|
+
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18212
|
+
className: `${b2(classNameSuffix)} ${b2("rate")}`,
|
|
18213
|
+
style: calcStyle
|
|
18214
|
+
}, calcRate);
|
|
18215
|
+
};
|
|
18216
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18217
|
+
className: `${b2()} ${className}`,
|
|
18218
|
+
...rest,
|
|
18219
|
+
onClick: handleClick2
|
|
18220
|
+
}, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
|
|
18221
|
+
size: calcIconProps.size,
|
|
18222
|
+
name: calcIconProps.name,
|
|
18223
|
+
color: calcIconProps.color
|
|
18224
|
+
})), arrowLeft && renderContent(!arrowLeft));
|
|
18225
|
+
};
|
|
18226
|
+
TrendArrow.defaultProps = defaultProps$a;
|
|
18227
|
+
TrendArrow.displayName = "NutTrendArrow";
|
|
18228
|
+
const defaultProps$9 = {
|
|
18229
|
+
content: "",
|
|
18230
|
+
fullPage: true,
|
|
18231
|
+
zIndex: 2e3,
|
|
18232
|
+
gapX: 24,
|
|
18233
|
+
gapY: 48,
|
|
18234
|
+
width: 120,
|
|
18235
|
+
height: 64,
|
|
18236
|
+
image: "",
|
|
18237
|
+
imageWidth: 120,
|
|
18238
|
+
imageHeight: 64,
|
|
18239
|
+
rotate: -22,
|
|
18240
|
+
fontColor: "rgba(0,0,0,.15)",
|
|
18241
|
+
fontStyle: "normal",
|
|
18242
|
+
fontFamily: "PingFang SC",
|
|
18243
|
+
fontWeight: "normal",
|
|
18244
|
+
fontSize: 14
|
|
18245
|
+
};
|
|
18246
|
+
const WaterMark = (props) => {
|
|
18247
|
+
const { locale } = useConfig();
|
|
18248
|
+
const {
|
|
18249
|
+
content,
|
|
18250
|
+
fullPage,
|
|
18251
|
+
zIndex,
|
|
18252
|
+
className,
|
|
18253
|
+
gapX,
|
|
18254
|
+
gapY,
|
|
18255
|
+
width,
|
|
18256
|
+
height,
|
|
18257
|
+
image,
|
|
18258
|
+
imageWidth,
|
|
18259
|
+
imageHeight,
|
|
18260
|
+
rotate,
|
|
18261
|
+
fontColor,
|
|
18262
|
+
fontStyle,
|
|
18263
|
+
fontFamily,
|
|
18264
|
+
fontWeight,
|
|
18265
|
+
fontSize,
|
|
18266
|
+
style,
|
|
18267
|
+
children
|
|
18268
|
+
} = {
|
|
18269
|
+
...defaultProps$9,
|
|
18270
|
+
...props
|
|
18271
|
+
};
|
|
18272
|
+
const [base64Url, setBase64Url] = React.useState("");
|
|
18273
|
+
const b2 = cn("watermark");
|
|
18274
|
+
const classes = classNames({
|
|
18275
|
+
[`${b2("")}`]: true,
|
|
18276
|
+
[`${b2("")}-full-page`]: fullPage
|
|
18277
|
+
});
|
|
18278
|
+
const cls = classNames(classes, className);
|
|
18279
|
+
React.useEffect(() => {
|
|
18280
|
+
init();
|
|
18281
|
+
}, []);
|
|
18282
|
+
const init = () => {
|
|
18283
|
+
let ratio = 1;
|
|
18284
|
+
Taro__default["default"].getSystemInfo({
|
|
18285
|
+
success(res) {
|
|
18286
|
+
ratio = res.pixelRatio;
|
|
18287
|
+
}
|
|
18288
|
+
});
|
|
18289
|
+
const canvasWidth = `${(gapX + width) * ratio}px`;
|
|
18290
|
+
const canvasHeight = `${(gapY + height) * ratio}px`;
|
|
18291
|
+
const markWidth = width * ratio;
|
|
18292
|
+
const markHeight = height * ratio;
|
|
18293
|
+
const canvas = Taro__default["default"].createOffscreenCanvas({
|
|
18294
|
+
type: "2d",
|
|
18295
|
+
width: Number(canvasWidth),
|
|
18296
|
+
height: Number(canvasHeight)
|
|
18297
|
+
});
|
|
18298
|
+
const ctx2 = canvas.getContext("2d");
|
|
18299
|
+
if (ctx2) {
|
|
18300
|
+
if (image) {
|
|
18301
|
+
ctx2.translate(markWidth / 2, markHeight / 2);
|
|
18302
|
+
ctx2.rotate(Math.PI / 180 * Number(rotate));
|
|
18303
|
+
const img = canvas.createImage();
|
|
18304
|
+
img.crossOrigin = "anonymous";
|
|
18305
|
+
img.referrerPolicy = "no-referrer";
|
|
18306
|
+
img.src = image;
|
|
18307
|
+
img.onload = () => {
|
|
18308
|
+
ctx2.drawImage(
|
|
18309
|
+
img,
|
|
18310
|
+
-imageWidth * ratio / 2,
|
|
18311
|
+
-imageHeight * ratio / 2,
|
|
18312
|
+
imageWidth * ratio,
|
|
18313
|
+
imageHeight * ratio
|
|
18314
|
+
);
|
|
18315
|
+
ctx2.restore();
|
|
18316
|
+
setBase64Url(canvas.toDataURL());
|
|
18317
|
+
};
|
|
18318
|
+
} else if (content) {
|
|
18319
|
+
ctx2.textBaseline = "middle";
|
|
18320
|
+
ctx2.textAlign = "center";
|
|
18321
|
+
ctx2.translate(markWidth / 2, markHeight / 2);
|
|
18322
|
+
ctx2.rotate(Math.PI / 180 * Number(rotate));
|
|
18323
|
+
const markSize = Number(fontSize) * ratio;
|
|
18324
|
+
ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
18325
|
+
ctx2.fillStyle = fontColor;
|
|
18326
|
+
ctx2.fillText(content, 0, 0);
|
|
18327
|
+
ctx2.restore();
|
|
18328
|
+
setBase64Url(canvas.toDataURL());
|
|
18329
|
+
}
|
|
18330
|
+
} else {
|
|
18331
|
+
throw new Error(locale.watermark.errorCanvasTips);
|
|
18332
|
+
}
|
|
18333
|
+
};
|
|
18334
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18335
|
+
className: cls,
|
|
18336
|
+
style: {
|
|
18337
|
+
zIndex,
|
|
18338
|
+
backgroundSize: `${gapX + width}px`,
|
|
18339
|
+
backgroundImage: `url('${base64Url}')`,
|
|
18340
|
+
...style
|
|
18341
|
+
}
|
|
18342
|
+
});
|
|
18343
|
+
};
|
|
18344
|
+
WaterMark.defaultProps = defaultProps$9;
|
|
18345
|
+
WaterMark.displayName = "NutWaterMark";
|
|
18037
18346
|
const defaultProps$8 = {
|
|
18038
18347
|
type: "custom",
|
|
18039
18348
|
existAddress: [],
|
|
@@ -19115,6 +19424,7 @@
|
|
|
19115
19424
|
exports2.Grid = Grid;
|
|
19116
19425
|
exports2.GridItem = GridItem;
|
|
19117
19426
|
exports2.Icon = Icon$1;
|
|
19427
|
+
exports2.Image = Image;
|
|
19118
19428
|
exports2.ImagePreview = ImagePreview;
|
|
19119
19429
|
exports2.Indicator = Indicator;
|
|
19120
19430
|
exports2.Infiniteloading = Infiniteloading;
|
|
@@ -19165,8 +19475,10 @@
|
|
|
19165
19475
|
exports2.TimePannel = TimePannel;
|
|
19166
19476
|
exports2.TimeSelect = TimeSelect;
|
|
19167
19477
|
exports2.Toast = Toast;
|
|
19478
|
+
exports2.TrendArrow = TrendArrow;
|
|
19168
19479
|
exports2.Uploader = Uploader;
|
|
19169
19480
|
exports2.Video = Video;
|
|
19170
19481
|
exports2.VirtualList = VirtualList;
|
|
19482
|
+
exports2.WaterMark = WaterMark;
|
|
19171
19483
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
19172
19484
|
});
|