@nutui/nutui-react-taro 1.5.2 → 1.5.3-beta.0
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 +0 -1
- package/dist/esm/ActionSheet.js +14 -90
- package/dist/esm/Address.js +21 -620
- package/dist/esm/Animate.js +7 -53
- package/dist/esm/AnimatingNumbers.js +7 -125
- package/dist/esm/Audio.js +19 -264
- package/dist/esm/Avatar.js +11 -130
- package/dist/esm/{AvatarContext-15733596.js → AvatarContext-c96afdcc.js} +3 -1
- package/dist/esm/AvatarGroup.js +11 -41
- package/dist/esm/BackTop.js +10 -138
- package/dist/esm/Badge.js +9 -71
- package/dist/esm/Barrage.js +8 -97
- package/dist/esm/Button.js +9 -108
- package/dist/esm/Calendar.js +20 -128
- package/dist/esm/CalendarItem.js +12 -674
- package/dist/esm/Card.js +11 -61
- package/dist/esm/Cascader.js +16 -671
- package/dist/esm/Cell.js +9 -101
- package/dist/esm/CellGroup.js +5 -2
- package/dist/esm/Checkbox.js +7 -5
- package/dist/esm/CheckboxGroup.js +8 -111
- package/dist/esm/CircleProgress.js +8 -114
- package/dist/esm/Col.js +7 -57
- package/dist/esm/Collapse.js +7 -97
- package/dist/esm/CollapseItem.js +8 -146
- package/dist/esm/ConfigProvider.js +8 -187
- package/dist/esm/CountDown.js +9 -247
- package/dist/esm/DatePicker.js +25 -309
- package/dist/esm/Dialog.js +17 -296
- package/dist/esm/Divider.js +7 -34
- package/dist/esm/Drag.js +7 -118
- package/dist/esm/Elevator.js +8 -234
- package/dist/esm/Ellipsis.js +10 -176
- package/dist/esm/Empty.js +8 -79
- package/dist/esm/FixedNav.js +14 -103
- package/dist/esm/Form.js +10 -215
- package/dist/esm/FormItem.js +10 -3
- package/dist/esm/Grid.js +11 -81
- package/dist/esm/GridItem.js +13 -123
- package/dist/esm/Icon.js +5 -2
- package/dist/esm/Image.js +11 -169
- package/dist/esm/ImagePreview.js +19 -225
- package/dist/esm/Indicator.js +7 -50
- package/dist/esm/Infiniteloading.js +14 -215
- package/dist/esm/Input.js +12 -362
- package/dist/esm/InputNumber.js +9 -275
- package/dist/esm/Layout.js +5 -13
- package/dist/esm/Menu.js +10 -153
- package/dist/esm/MenuItem.js +15 -175
- package/dist/esm/NavBar.js +9 -114
- package/dist/esm/NoticeBar.js +10 -568
- package/dist/esm/Notify.js +8 -234
- package/dist/esm/NumberKeyboard.js +17 -247
- package/dist/esm/Overlay.js +6 -2
- package/dist/esm/Pagination.js +9 -168
- package/dist/esm/Picker.js +22 -494
- package/dist/esm/Popover.js +12 -223
- package/dist/esm/Popup.js +13 -193
- package/dist/esm/Price.js +6 -84
- package/dist/esm/Progress.js +9 -122
- package/dist/esm/PullToRefresh.js +13 -276
- package/dist/esm/Radio.js +8 -4
- package/dist/esm/RadioGroup.js +7 -120
- package/dist/esm/Range.js +15 -406
- package/dist/esm/Rate.js +9 -121
- package/dist/esm/Row.js +7 -49
- package/dist/esm/SearchBar.js +12 -235
- package/dist/esm/ShortPassword.js +17 -191
- package/dist/esm/SideNavBar.js +19 -57
- package/dist/esm/SideNavBarItem.js +5 -24
- package/dist/esm/Signature.js +13 -153
- package/dist/esm/Skeleton.js +12 -98
- package/dist/esm/Step.js +10 -87
- package/dist/esm/Steps.js +8 -38
- package/dist/esm/Sticky.js +11 -190
- package/dist/esm/SubSideNavBar.js +6 -78
- package/dist/esm/Swipe.js +10 -230
- package/dist/esm/Swiper.js +9 -490
- package/dist/esm/SwiperItem.js +8 -36
- package/dist/esm/Switch.js +6 -71
- package/dist/esm/TabPane.js +5 -2
- package/dist/esm/Tabbar.js +6 -68
- package/dist/esm/TabbarItem.js +9 -78
- package/dist/esm/Table.js +12 -140
- package/dist/esm/Tabs.js +8 -5
- package/dist/esm/Tag.js +10 -110
- package/dist/esm/TextArea.js +9 -148
- package/dist/esm/TimeDetail.js +9 -67
- package/dist/esm/TimePannel.js +9 -29
- package/dist/esm/TimeSelect.js +19 -171
- package/dist/esm/Toast.js +7 -268
- package/dist/esm/TrendArrow.js +7 -99
- package/dist/esm/Uploader.js +17 -566
- package/dist/esm/{UserContext-101ad4a4.js → UserContext-0aac9a82.js} +3 -1
- package/dist/esm/{UserContext-2629d479.js → UserContext-e402e1a6.js} +3 -1
- package/dist/esm/{UserContext-b33bcf21.js → UserContext-e8176108.js} +3 -1
- package/dist/esm/Video.js +7 -90
- package/dist/esm/VirtualList.js +9 -313
- package/dist/esm/WaterMark.js +11 -111
- package/dist/esm/actionsheet.taro-e6a51446.js +53 -0
- package/dist/esm/address.taro-3a9b6396.js +461 -0
- package/dist/esm/animate.taro-fb7986d6.js +40 -0
- package/dist/esm/animatingnumbers.taro-03e5d61d.js +104 -0
- package/dist/esm/audio.taro-87ec8bf2.js +161 -0
- package/dist/esm/avatar.taro-3676f38f.js +103 -0
- package/dist/esm/avatargroup-f3574510.js +34 -0
- package/dist/esm/backtop.taro-66394a36.js +48 -0
- package/dist/esm/badge.taro-a4e59c11.js +52 -0
- package/dist/esm/barrage.taro-0495a1b2.js +94 -0
- package/dist/esm/{bem-3b438e61.js → bem-350c1702.js} +3 -6
- package/dist/esm/button.taro-9244d065.js +100 -0
- package/dist/esm/calendar.taro-670842ea.js +65 -0
- package/dist/esm/calendaritem.taro-2a603571.js +787 -0
- package/dist/esm/can-use-dom-3eeb5af4.js +6 -0
- package/dist/esm/card.taro-e4c76dad.js +33 -0
- package/dist/esm/cascader.taro-eb1fb011.js +438 -0
- package/dist/esm/cell.taro-a10a74d3.js +64 -0
- package/dist/esm/cellgroup.taro-abe501bc.js +25 -0
- package/dist/esm/checkbox.taro-6120e3e3.js +171 -0
- package/dist/esm/circleprogress.taro-79854448.js +109 -0
- package/dist/esm/col.taro-53eed3cc.js +41 -0
- package/dist/esm/collapse.taro-1a9e4ba2.js +83 -0
- package/dist/esm/collapseitem-4d0bc55d.js +83 -0
- package/dist/esm/configprovider-67d19d3a.js +19 -0
- package/dist/esm/configprovider.taro-8d71eb49.js +42 -0
- package/dist/esm/countdown.taro-5b17c607.js +226 -0
- package/dist/esm/datepicker.taro-6e9b4b8f.js +275 -0
- package/dist/esm/dialog.taro-a3267d29.js +118 -0
- package/dist/esm/divider.taro-26d1d8b4.js +35 -0
- package/dist/esm/drag.taro-79bb8744.js +110 -0
- package/dist/esm/elevator.taro-6019669e.js +178 -0
- package/dist/esm/ellipsis.taro-f15f26da.js +241 -0
- package/dist/esm/empty.taro-04ae4389.js +62 -0
- package/dist/esm/fixednav.taro-1f05acaf.js +53 -0
- package/dist/esm/form.taro-0c8e7a39.js +179 -0
- package/dist/esm/formitem.taro-190a3326.js +89 -0
- package/dist/esm/get-scroll-parent-b4a07e65.js +25 -0
- package/dist/esm/grid.taro-3503b82c.js +61 -0
- package/dist/esm/{grid.context-2ee27d95.js → grid.taro.context-c2bbfb4f.js} +4 -2
- package/dist/esm/griditem.taro-cdb3f119.js +98 -0
- package/dist/esm/icon-296a1bec.js +63 -0
- package/dist/esm/icon.taro-296a1bec.js +63 -0
- package/dist/esm/image.taro-142cf512.js +64 -0
- package/dist/esm/imagepreview.taro-c50bb0a3.js +167 -0
- package/dist/esm/index-5bcb0ff8.js +7 -0
- package/dist/esm/indicator.taro-cba8b010.js +37 -0
- package/dist/esm/infiniteloading.taro-183bccbf.js +144 -0
- package/dist/esm/input.taro-97af6c96.js +240 -0
- package/dist/esm/inputnumber.taro-91f65d17.js +130 -0
- package/dist/esm/layout.taro-9046d093.js +11 -0
- package/dist/esm/menu.taro-7e4038a1.js +99 -0
- package/dist/esm/menuitem.taro-96cc4f15.js +130 -0
- package/dist/esm/navbar.taro-777c4705.js +79 -0
- package/dist/esm/noticebar.taro-4a23cdee.js +448 -0
- package/dist/esm/notify.taro-e17c6f82.js +75 -0
- package/dist/esm/numberkeyboard.taro-1bc24744.js +159 -0
- package/dist/esm/nutui-react.es.js +119 -94
- package/dist/esm/offsetContext-c2a746fa.js +5 -0
- package/dist/esm/overlay.taro-21e87fb1.js +69 -0
- package/dist/esm/pagination.taro-715a173b.js +124 -0
- package/dist/esm/picker.taro-9ad1b7c5.js +473 -0
- package/dist/esm/popover.taro-ad5e76ea.js +156 -0
- package/dist/esm/popup.taro-01676bff.js +137 -0
- package/dist/esm/price.taro-776ed16e.js +83 -0
- package/dist/esm/progress.taro-f0ce38e9.js +90 -0
- package/dist/esm/pulltorefresh.taro-a294f656.js +181 -0
- package/dist/esm/radio.taro-a6eff96c.js +168 -0
- package/dist/esm/range.taro-d8fc7656.js +332 -0
- package/dist/esm/rate.taro-6cdf03bd.js +75 -0
- package/dist/esm/row.taro-f64d4a13.js +46 -0
- package/dist/esm/searchbar.taro-0c25927b.js +152 -0
- package/dist/esm/shortpassword.taro-9ee034f7.js +111 -0
- package/dist/esm/sidenavbar.taro-c307b35e.js +35 -0
- package/dist/esm/sidenavbaritem.taro-5a7965d0.js +12 -0
- package/dist/esm/signature.taro-ec4e713b.js +143 -0
- package/dist/esm/skeleton.taro-76faf63f.js +62 -0
- package/dist/esm/step.taro-b7903e8c.js +59 -0
- package/dist/esm/steps.taro-c82d2252.js +30 -0
- package/dist/esm/sticky.taro-218bda37.js +138 -0
- package/dist/esm/subsidenavbar.taro-69cb9752.js +63 -0
- package/dist/esm/supports-passive-c85ef996.js +18 -0
- package/dist/esm/swipe.taro-ea35f07f.js +177 -0
- package/dist/esm/swiper.taro-7a94e211.js +451 -0
- package/dist/esm/swiperitem-c9e3d0d5.js +29 -0
- package/dist/esm/switch.taro-34ca8228.js +50 -0
- package/dist/esm/tabbar.taro-9acfc2fa.js +59 -0
- package/dist/esm/tabbaritem.taro-bf517487.js +58 -0
- package/dist/esm/table.taro-91fc0c01.js +93 -0
- package/dist/esm/tabpane.taro-4ca340ef.js +23 -0
- package/dist/esm/tabs.taro-6a7524a4.js +140 -0
- package/dist/esm/tag.taro-23ba0834.js +92 -0
- package/dist/esm/textarea.taro-442e7350.js +94 -0
- package/dist/esm/timedetail.taro-5b2f2269.js +44 -0
- package/dist/esm/timepannel.taro-d6e40180.js +22 -0
- package/dist/esm/timeselect.taro-a07036f4.js +133 -0
- package/dist/esm/toast.taro-d6c14811.js +109 -0
- package/dist/esm/trendarrow.taro-b8c5ccd9.js +73 -0
- package/dist/esm/typings-b9828dba.js +9 -0
- package/dist/esm/uploader.taro-587e6bf3.js +492 -0
- package/dist/esm/useClientRect-1f8ed1fe.js +18 -0
- package/dist/esm/useTouch-db24bb5c.js +69 -0
- package/dist/esm/video-f1be8a91.js +67 -0
- package/dist/esm/virtuallist.taro-f0b0270d.js +214 -0
- package/dist/esm/watermark.taro-9ce2ae37.js +114 -0
- package/dist/esm/zh-CN-c779e6c1.js +131 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +13030 -14863
- package/dist/nutui.react.umd.js +13029 -14864
- package/dist/style.mjs +1 -1
- package/dist/types/index.d.ts +176 -183
- package/package.json +1 -1
- package/dist/esm/cellgroup-fcc72767.js +0 -34
- package/dist/esm/checkbox-44e13cd0.js +0 -137
- package/dist/esm/date-c7aad4c0.js +0 -97
- package/dist/esm/formitem-8a73a5fb.js +0 -157
- package/dist/esm/get-scroll-parent-5f85dee8.js +0 -24
- package/dist/esm/icon-4ef1581c.js +0 -70
- package/dist/esm/index-030b7245.js +0 -11
- package/dist/esm/offsetContext-3ab00d40.js +0 -16
- package/dist/esm/overlay-de6c79d5.js +0 -83
- package/dist/esm/radio-9f141e6b.js +0 -118
- package/dist/esm/render-bbebb760.js +0 -79
- package/dist/esm/tabpane-01075e6c.js +0 -29
- package/dist/esm/tabs-e1b4e4b1.js +0 -181
- package/dist/esm/typings-f27b58f4.js +0 -8
- package/dist/esm/useClientRect-56bb675b.js +0 -39
- package/dist/esm/useTouch-cf73a407.js +0 -99
package/dist/esm/Signature.js
CHANGED
|
@@ -1,155 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import React__default, { useRef, useState, useEffect } from 'react';
|
|
8
|
-
import Button from './Button.js';
|
|
9
|
-
import { c as cn } from './bem-3b438e61.js';
|
|
10
|
-
import { useConfig } from './ConfigProvider.js';
|
|
1
|
+
import { S as Signature } from './signature.taro-ec4e713b.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@tarojs/taro';
|
|
4
|
+
import './button.taro-9244d065.js';
|
|
5
|
+
import './icon.taro-296a1bec.js';
|
|
6
|
+
import './bem-350c1702.js';
|
|
11
7
|
import '@bem-react/classname';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var Signature = function Signature(props) {
|
|
20
|
-
var _useConfig = useConfig(),
|
|
21
|
-
locale = _useConfig.locale;
|
|
22
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
23
|
-
type = _defaultProps$props.type,
|
|
24
|
-
lineWidth = _defaultProps$props.lineWidth,
|
|
25
|
-
strokeStyle = _defaultProps$props.strokeStyle,
|
|
26
|
-
unSupportTpl = _defaultProps$props.unSupportTpl,
|
|
27
|
-
className = _defaultProps$props.className,
|
|
28
|
-
confirm = _defaultProps$props.confirm,
|
|
29
|
-
clear = _defaultProps$props.clear,
|
|
30
|
-
onConfirm = _defaultProps$props.onConfirm,
|
|
31
|
-
onClear = _defaultProps$props.onClear,
|
|
32
|
-
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
33
|
-
var b = cn('signature');
|
|
34
|
-
var canvasRef = useRef(null);
|
|
35
|
-
var wrapRef = useRef(null);
|
|
36
|
-
var _useState = useState(0),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
canvasHeight = _useState2[0],
|
|
39
|
-
setCanvasHeight = _useState2[1];
|
|
40
|
-
var _useState3 = useState(0),
|
|
41
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
|
-
canvasWidth = _useState4[0],
|
|
43
|
-
setCanvasWidth = _useState4[1];
|
|
44
|
-
var ctx = useRef(null);
|
|
45
|
-
var isCanvasSupported = function isCanvasSupported() {
|
|
46
|
-
var elem = document.createElement('canvas');
|
|
47
|
-
return !!(elem.getContext && elem.getContext('2d'));
|
|
48
|
-
};
|
|
49
|
-
var isSupportTouch = ('ontouchstart' in window);
|
|
50
|
-
var events = isSupportTouch ? ['touchstart', 'touchmove', 'touchend', 'touchleave'] : ['mousedown', 'mousemove', 'mouseup', 'mouseleave'];
|
|
51
|
-
useEffect(function () {
|
|
52
|
-
if (isCanvasSupported() && canvasRef.current && wrapRef.current) {
|
|
53
|
-
ctx.current = canvasRef.current.getContext('2d');
|
|
54
|
-
setCanvasWidth(wrapRef.current.offsetWidth);
|
|
55
|
-
setCanvasHeight(wrapRef.current.offsetHeight);
|
|
56
|
-
addEvent();
|
|
57
|
-
}
|
|
58
|
-
}, []);
|
|
59
|
-
var startEventHandler = function startEventHandler(event) {
|
|
60
|
-
event.preventDefault();
|
|
61
|
-
if (ctx.current && canvasRef.current) {
|
|
62
|
-
ctx.current.beginPath();
|
|
63
|
-
ctx.current.lineWidth = lineWidth;
|
|
64
|
-
ctx.current.strokeStyle = strokeStyle;
|
|
65
|
-
canvasRef.current.addEventListener(events[1], moveEventHandler, false);
|
|
66
|
-
canvasRef.current.addEventListener(events[2], endEventHandler, false);
|
|
67
|
-
canvasRef.current.addEventListener(events[3], leaveEventHandler, false);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var addEvent = function addEvent() {
|
|
71
|
-
if (canvasRef.current) {
|
|
72
|
-
canvasRef.current.addEventListener(events[0], startEventHandler, false);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
var moveEventHandler = function moveEventHandler(event) {
|
|
76
|
-
event.preventDefault();
|
|
77
|
-
var evt = isSupportTouch ? event.touches[0] : event;
|
|
78
|
-
if (canvasRef.current && ctx.current) {
|
|
79
|
-
var coverPos = canvasRef.current.getBoundingClientRect();
|
|
80
|
-
var mouseX = evt.clientX - coverPos.left;
|
|
81
|
-
var mouseY = evt.clientY - coverPos.top;
|
|
82
|
-
ctx.current.lineTo(mouseX, mouseY);
|
|
83
|
-
ctx.current.stroke();
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
var endEventHandler = function endEventHandler(event) {
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
if (canvasRef.current) {
|
|
89
|
-
canvasRef.current.removeEventListener(events[1], moveEventHandler, false);
|
|
90
|
-
canvasRef.current.removeEventListener(events[2], endEventHandler, false);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
var leaveEventHandler = function leaveEventHandler(event) {
|
|
94
|
-
event.preventDefault();
|
|
95
|
-
if (canvasRef.current) {
|
|
96
|
-
canvasRef.current.removeEventListener(events[1], moveEventHandler, false);
|
|
97
|
-
canvasRef.current.removeEventListener(events[2], endEventHandler, false);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
var handleClearBtn = function handleClearBtn() {
|
|
101
|
-
if (canvasRef.current && ctx.current) {
|
|
102
|
-
canvasRef.current.addEventListener(events[2], endEventHandler, false);
|
|
103
|
-
ctx.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
104
|
-
ctx.current.closePath();
|
|
105
|
-
}
|
|
106
|
-
clear && clear();
|
|
107
|
-
onClear && onClear();
|
|
108
|
-
};
|
|
109
|
-
var handleConfirmBtn = function handleConfirmBtn() {
|
|
110
|
-
onSave(canvasRef.current);
|
|
111
|
-
};
|
|
112
|
-
var onSave = function onSave(canvas) {
|
|
113
|
-
var dataurl;
|
|
114
|
-
switch (type) {
|
|
115
|
-
case 'png':
|
|
116
|
-
dataurl = canvas.toDataURL('image/png');
|
|
117
|
-
break;
|
|
118
|
-
case 'jpg':
|
|
119
|
-
dataurl = canvas.toDataURL('image/jpeg', 0.8);
|
|
120
|
-
break;
|
|
121
|
-
default:
|
|
122
|
-
dataurl = canvas.toDataURL('image/png');
|
|
123
|
-
}
|
|
124
|
-
handleClearBtn();
|
|
125
|
-
confirm && confirm(canvas, dataurl);
|
|
126
|
-
onConfirm && onConfirm(canvas, dataurl);
|
|
127
|
-
};
|
|
128
|
-
return React__default.createElement("div", _objectSpread({
|
|
129
|
-
className: "".concat(b(), " ").concat(className)
|
|
130
|
-
}, rest), React__default.createElement("div", {
|
|
131
|
-
className: "".concat(b('inner')),
|
|
132
|
-
ref: wrapRef
|
|
133
|
-
}, isCanvasSupported() ? React__default.createElement("canvas", {
|
|
134
|
-
ref: canvasRef,
|
|
135
|
-
height: canvasHeight,
|
|
136
|
-
width: canvasWidth
|
|
137
|
-
}) : React__default.createElement("p", {
|
|
138
|
-
className: "".concat(b('unsopport'))
|
|
139
|
-
}, locale.signature.unSupportTpl || unSupportTpl)), React__default.createElement(Button, {
|
|
140
|
-
className: "".concat(b('btn')),
|
|
141
|
-
type: "default",
|
|
142
|
-
onClick: function onClick() {
|
|
143
|
-
return handleClearBtn();
|
|
144
|
-
}
|
|
145
|
-
}, locale.signature.reSign), React__default.createElement(Button, {
|
|
146
|
-
className: "".concat(b('btn')),
|
|
147
|
-
type: "primary",
|
|
148
|
-
onClick: function onClick() {
|
|
149
|
-
return handleConfirmBtn();
|
|
150
|
-
}
|
|
151
|
-
}, locale.confirm));
|
|
152
|
-
};
|
|
153
|
-
Signature.defaultProps = defaultProps;
|
|
154
|
-
Signature.displayName = 'NutSignature';
|
|
8
|
+
import './typings-b9828dba.js';
|
|
9
|
+
import './configprovider.taro-8d71eb49.js';
|
|
10
|
+
import 'lodash.kebabcase';
|
|
11
|
+
import './zh-CN-c779e6c1.js';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
155
15
|
export { Signature as default };
|
package/dist/esm/Skeleton.js
CHANGED
|
@@ -1,100 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import Avatar from './Avatar.js';
|
|
9
|
-
import { c as cn } from './bem-3b438e61.js';
|
|
1
|
+
import { S as Skeleton } from './skeleton.taro-76faf63f.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import './avatar.taro-3676f38f.js';
|
|
5
|
+
import '@tarojs/components';
|
|
6
|
+
import './AvatarContext-c96afdcc.js';
|
|
7
|
+
import './bem-350c1702.js';
|
|
10
8
|
import '@bem-react/classname';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
title: false,
|
|
17
|
-
avatar: false,
|
|
18
|
-
round: false,
|
|
19
|
-
avatarSize: '50px',
|
|
20
|
-
loading: false,
|
|
21
|
-
avatarShape: 'round'
|
|
22
|
-
};
|
|
23
|
-
var Skeleton = function Skeleton(props) {
|
|
24
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
25
|
-
className = _defaultProps$props.className,
|
|
26
|
-
width = _defaultProps$props.width,
|
|
27
|
-
height = _defaultProps$props.height,
|
|
28
|
-
animated = _defaultProps$props.animated,
|
|
29
|
-
row = _defaultProps$props.row,
|
|
30
|
-
title = _defaultProps$props.title,
|
|
31
|
-
avatar = _defaultProps$props.avatar,
|
|
32
|
-
avatarSize = _defaultProps$props.avatarSize,
|
|
33
|
-
round = _defaultProps$props.round,
|
|
34
|
-
loading = _defaultProps$props.loading,
|
|
35
|
-
children = _defaultProps$props.children,
|
|
36
|
-
avatarShape = _defaultProps$props.avatarShape,
|
|
37
|
-
restProps = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
38
|
-
var b = cn('skeleton');
|
|
39
|
-
var classes = classNames(className, b());
|
|
40
|
-
var blockClass = classNames({
|
|
41
|
-
blockClass: true,
|
|
42
|
-
'blockClass--round': round
|
|
43
|
-
});
|
|
44
|
-
var avatarClass = classNames(_defineProperty({
|
|
45
|
-
avatarClass: true
|
|
46
|
-
}, "avatarClass--".concat(avatarShape), avatarShape));
|
|
47
|
-
var repeatLines = function repeatLines(num) {
|
|
48
|
-
return Array.from({
|
|
49
|
-
length: num
|
|
50
|
-
}, function (v, i) {
|
|
51
|
-
return i;
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
var getStyle = function getStyle() {
|
|
55
|
-
if (avatarSize) {
|
|
56
|
-
return {
|
|
57
|
-
width: avatarSize,
|
|
58
|
-
height: avatarSize
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
width: '50px',
|
|
63
|
-
height: '50px'
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
return React__default.createElement(React__default.Fragment, null, loading ? React__default.createElement("div", null, children) : React__default.createElement("div", _objectSpread({
|
|
67
|
-
className: classes
|
|
68
|
-
}, restProps), animated && React__default.createElement("div", {
|
|
69
|
-
className: "skeleton-animation"
|
|
70
|
-
}), React__default.createElement("div", {
|
|
71
|
-
className: "nut-skeleton-content"
|
|
72
|
-
}, avatar && React__default.createElement(Avatar, {
|
|
73
|
-
className: avatarClass,
|
|
74
|
-
bgColor: "rgb(239, 239, 239)",
|
|
75
|
-
shape: avatarShape,
|
|
76
|
-
style: getStyle()
|
|
77
|
-
}), row === 1 && React__default.createElement("div", {
|
|
78
|
-
className: blockClass,
|
|
79
|
-
style: {
|
|
80
|
-
width: width,
|
|
81
|
-
height: height
|
|
82
|
-
}
|
|
83
|
-
}), React__default.createElement("div", {
|
|
84
|
-
className: "skeleton-content-line"
|
|
85
|
-
}, title && React__default.createElement("div", {
|
|
86
|
-
className: "skeleton-title"
|
|
87
|
-
}), repeatLines(row).map(function (item, index) {
|
|
88
|
-
return React__default.createElement("div", {
|
|
89
|
-
className: blockClass,
|
|
90
|
-
key: index,
|
|
91
|
-
style: {
|
|
92
|
-
width: width,
|
|
93
|
-
height: height
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
})))));
|
|
97
|
-
};
|
|
98
|
-
Skeleton.defaultProps = defaultProps;
|
|
99
|
-
Skeleton.displayName = 'NutSkeleton';
|
|
9
|
+
import './icon.taro-296a1bec.js';
|
|
10
|
+
import './typings-b9828dba.js';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
100
14
|
export { Skeleton as default };
|
package/dist/esm/Step.js
CHANGED
|
@@ -1,89 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import React__default, { useContext } from 'react';
|
|
7
|
-
import classNames from 'classnames';
|
|
8
|
-
import { D as DataContext } from './UserContext-b33bcf21.js';
|
|
9
|
-
import { c as cn } from './bem-3b438e61.js';
|
|
10
|
-
import Icon from './Icon.js';
|
|
11
|
-
import { C as ComponentDefaults } from './typings-f27b58f4.js';
|
|
1
|
+
import { S as Step } from './step.taro-b7903e8c.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import './UserContext-e402e1a6.js';
|
|
5
|
+
import './bem-350c1702.js';
|
|
12
6
|
import '@bem-react/classname';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
iconColor: '',
|
|
19
|
-
size: '12px'
|
|
20
|
-
});
|
|
21
|
-
var Step = function Step(props) {
|
|
22
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
23
|
-
children = _defaultProps$props.children,
|
|
24
|
-
title = _defaultProps$props.title,
|
|
25
|
-
content = _defaultProps$props.content,
|
|
26
|
-
activeIndex = _defaultProps$props.activeIndex,
|
|
27
|
-
icon = _defaultProps$props.icon,
|
|
28
|
-
iconColor = _defaultProps$props.iconColor,
|
|
29
|
-
size = _defaultProps$props.size,
|
|
30
|
-
className = _defaultProps$props.className,
|
|
31
|
-
renderContent = _defaultProps$props.renderContent,
|
|
32
|
-
iconClassPrefix = _defaultProps$props.iconClassPrefix,
|
|
33
|
-
iconFontClassName = _defaultProps$props.iconFontClassName,
|
|
34
|
-
restProps = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
35
|
-
var parent = useContext(DataContext);
|
|
36
|
-
var dot = parent.propSteps.progressDot;
|
|
37
|
-
var getCurrentStatus = function getCurrentStatus() {
|
|
38
|
-
var index = activeIndex;
|
|
39
|
-
if (index < +parent.propSteps.current) return 'finish';
|
|
40
|
-
return index === +parent.propSteps.current ? 'process' : 'wait';
|
|
41
|
-
};
|
|
42
|
-
var handleClickStep = function handleClickStep() {
|
|
43
|
-
var _parent$propSteps, _parent$propSteps2, _parent$propSteps3, _parent$propSteps4;
|
|
44
|
-
((_parent$propSteps = parent.propSteps) === null || _parent$propSteps === void 0 ? void 0 : _parent$propSteps.onClickStep) && ((_parent$propSteps2 = parent.propSteps) === null || _parent$propSteps2 === void 0 ? void 0 : _parent$propSteps2.onClickStep(activeIndex));
|
|
45
|
-
((_parent$propSteps3 = parent.propSteps) === null || _parent$propSteps3 === void 0 ? void 0 : _parent$propSteps3.clickStep) && ((_parent$propSteps4 = parent.propSteps) === null || _parent$propSteps4 === void 0 ? void 0 : _parent$propSteps4.clickStep(activeIndex));
|
|
46
|
-
};
|
|
47
|
-
var b = cn('step');
|
|
48
|
-
var classes = classNames(_defineProperty({}, "".concat(b(''), "-").concat(getCurrentStatus()), true), className, b(''));
|
|
49
|
-
var renderIconClass = function renderIconClass() {
|
|
50
|
-
if (!dot && icon) {
|
|
51
|
-
return 'nut-step-icon is-icon';
|
|
52
|
-
}
|
|
53
|
-
if (!dot && !icon) {
|
|
54
|
-
return 'nut-step-icon is-text';
|
|
55
|
-
}
|
|
56
|
-
return 'nut-step-icon';
|
|
57
|
-
};
|
|
58
|
-
return React__default.createElement("div", _objectSpread(_objectSpread({
|
|
59
|
-
className: classes
|
|
60
|
-
}, restProps), {}, {
|
|
61
|
-
onClick: handleClickStep
|
|
62
|
-
}), React__default.createElement("div", {
|
|
63
|
-
className: "nut-step-head"
|
|
64
|
-
}, React__default.createElement("div", {
|
|
65
|
-
className: "nut-step-line"
|
|
66
|
-
}), React__default.createElement("div", {
|
|
67
|
-
className: renderIconClass()
|
|
68
|
-
}, icon ? React__default.createElement(Icon, {
|
|
69
|
-
classPrefix: iconClassPrefix,
|
|
70
|
-
fontClassName: iconFontClassName,
|
|
71
|
-
className: "nut-step-icon-inner",
|
|
72
|
-
color: iconColor,
|
|
73
|
-
name: icon,
|
|
74
|
-
size: size
|
|
75
|
-
}) : !dot && React__default.createElement("span", {
|
|
76
|
-
className: "nut-step-inner"
|
|
77
|
-
}, activeIndex))), React__default.createElement("div", {
|
|
78
|
-
className: "nut-step-main"
|
|
79
|
-
}, React__default.createElement("span", {
|
|
80
|
-
className: "nut-step-title"
|
|
81
|
-
}, title), content && React__default.createElement("span", {
|
|
82
|
-
className: "nut-step-content"
|
|
83
|
-
}, content), renderContent && React__default.createElement("span", {
|
|
84
|
-
className: "nut-step-content"
|
|
85
|
-
}, renderContent())));
|
|
86
|
-
};
|
|
87
|
-
Step.defaultProps = defaultProps;
|
|
88
|
-
Step.displayName = 'NutStep';
|
|
7
|
+
import './icon.taro-296a1bec.js';
|
|
8
|
+
import './typings-b9828dba.js';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
89
12
|
export { Step as default };
|
package/dist/esm/Steps.js
CHANGED
|
@@ -1,40 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import React__default from 'react';
|
|
7
|
-
import classNames from 'classnames';
|
|
8
|
-
import { D as DataContext } from './UserContext-b33bcf21.js';
|
|
9
|
-
import { c as cn } from './bem-3b438e61.js';
|
|
1
|
+
import { S as Steps } from './steps.taro-c82d2252.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import './UserContext-e402e1a6.js';
|
|
5
|
+
import './bem-350c1702.js';
|
|
10
6
|
import '@bem-react/classname';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
progressDot: false
|
|
15
|
-
};
|
|
16
|
-
var Steps = function Steps(props) {
|
|
17
|
-
var _classNames;
|
|
18
|
-
var propSteps = _objectSpread(_objectSpread({}, defaultProps), props);
|
|
19
|
-
var children = propSteps.children,
|
|
20
|
-
current = propSteps.current,
|
|
21
|
-
direction = propSteps.direction,
|
|
22
|
-
className = propSteps.className,
|
|
23
|
-
progressDot = propSteps.progressDot,
|
|
24
|
-
clickStep = propSteps.clickStep,
|
|
25
|
-
onClickStep = propSteps.onClickStep,
|
|
26
|
-
restProps = _objectWithoutProperties(propSteps, _excluded);
|
|
27
|
-
var parentSteps = {
|
|
28
|
-
propSteps: propSteps
|
|
29
|
-
};
|
|
30
|
-
var b = cn('steps');
|
|
31
|
-
var classes = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(b(''), "-").concat(direction), true), _defineProperty(_classNames, "".concat(b(''), "-dot"), !!props.progressDot), _classNames), className, b(''));
|
|
32
|
-
return React__default.createElement(DataContext.Provider, {
|
|
33
|
-
value: parentSteps
|
|
34
|
-
}, React__default.createElement('div', _objectSpread({
|
|
35
|
-
className: classes
|
|
36
|
-
}, restProps), children));
|
|
37
|
-
};
|
|
38
|
-
Steps.defaultProps = defaultProps;
|
|
39
|
-
Steps.displayName = 'NutSteps';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
40
10
|
export { Steps as default };
|
package/dist/esm/Sticky.js
CHANGED
|
@@ -1,192 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { g as getScrollParent } from './get-scroll-parent-5f85dee8.js';
|
|
10
|
-
import { g as getRect } from './useClientRect-56bb675b.js';
|
|
11
|
-
import { c as cn } from './bem-3b438e61.js';
|
|
1
|
+
import { S as Sticky } from './sticky.taro-218bda37.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '@tarojs/taro';
|
|
5
|
+
import './useClientRect-1f8ed1fe.js';
|
|
6
|
+
import './get-scroll-parent-b4a07e65.js';
|
|
7
|
+
import './can-use-dom-3eeb5af4.js';
|
|
8
|
+
import './bem-350c1702.js';
|
|
12
9
|
import '@bem-react/classname';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
var immediate = config.immediate;
|
|
18
|
-
var prev = useRef();
|
|
19
|
-
var inited = useRef(false);
|
|
20
|
-
var stop = useRef(false);
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
var execute = function execute() {
|
|
23
|
-
return callback(prev.current);
|
|
24
|
-
};
|
|
25
|
-
if (!stop.current) {
|
|
26
|
-
if (!inited.current) {
|
|
27
|
-
inited.current = true;
|
|
28
|
-
if (immediate) {
|
|
29
|
-
execute();
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
execute();
|
|
33
|
-
}
|
|
34
|
-
prev.current = dep;
|
|
35
|
-
}
|
|
36
|
-
}, [dep]);
|
|
37
|
-
return function () {
|
|
38
|
-
stop.current = true;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
var defaultProps = {
|
|
42
|
-
position: 'top',
|
|
43
|
-
top: 0,
|
|
44
|
-
bottom: 0,
|
|
45
|
-
zIndex: 2000
|
|
46
|
-
};
|
|
47
|
-
var b = cn('sticky');
|
|
48
|
-
var Sticky = function Sticky(props) {
|
|
49
|
-
var _useState5;
|
|
50
|
-
var _props$position = props.position,
|
|
51
|
-
position = _props$position === void 0 ? 'top' : _props$position,
|
|
52
|
-
_props$top = props.top,
|
|
53
|
-
top = _props$top === void 0 ? 0 : _props$top,
|
|
54
|
-
_props$bottom = props.bottom,
|
|
55
|
-
bottom = _props$bottom === void 0 ? 0 : _props$bottom,
|
|
56
|
-
_props$zIndex = props.zIndex,
|
|
57
|
-
zIndex = _props$zIndex === void 0 ? 2000 : _props$zIndex,
|
|
58
|
-
children = props.children,
|
|
59
|
-
container = props.container,
|
|
60
|
-
className = props.className,
|
|
61
|
-
onChange = props.onChange,
|
|
62
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
63
|
-
// const { locale } = useConfig()
|
|
64
|
-
var stickyRef = useRef(null);
|
|
65
|
-
var rootRef = useRef(null);
|
|
66
|
-
var offset = position === 'top' ? top : bottom;
|
|
67
|
-
var _useState = useState(false),
|
|
68
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
-
isFixed = _useState2[0],
|
|
70
|
-
setIsFixed = _useState2[1];
|
|
71
|
-
var _useState3 = useState((_useState5 = {}, _defineProperty(_useState5, position, "".concat(offset, "px")), _defineProperty(_useState5, "zIndex", zIndex), _useState5)),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
stickyStyle = _useState4[0],
|
|
74
|
-
setStickyStyle = _useState4[1];
|
|
75
|
-
var _useState6 = useState({}),
|
|
76
|
-
_useState7 = _slicedToArray(_useState6, 2),
|
|
77
|
-
rootStyle = _useState7[0],
|
|
78
|
-
setRootStyle = _useState7[1];
|
|
79
|
-
var getElement = useCallback(function () {
|
|
80
|
-
// if (!rootRef.current) return Window
|
|
81
|
-
return getScrollParent(rootRef.current);
|
|
82
|
-
}, []);
|
|
83
|
-
useEffect(function () {
|
|
84
|
-
if (position === 'top') return;
|
|
85
|
-
var containerEle = container === null || container === void 0 ? void 0 : container.current;
|
|
86
|
-
if (!rootRef.current && !containerEle) return;
|
|
87
|
-
var rootRect = getRect(rootRef.current);
|
|
88
|
-
var containerRect = getRect(containerEle);
|
|
89
|
-
var clientHeight = document.documentElement.clientHeight;
|
|
90
|
-
var stCurrent = stickyRef.current;
|
|
91
|
-
var stickyRect = getRect(stCurrent);
|
|
92
|
-
var fixed = clientHeight - bottom < rootRect.bottom;
|
|
93
|
-
if (containerEle) {
|
|
94
|
-
fixed = containerRect.bottom > clientHeight - bottom - stickyRect.height && clientHeight - bottom - stickyRect.height > containerRect.top;
|
|
95
|
-
}
|
|
96
|
-
var defaultPostVal = fixed ? 'fixed' : 'inherit';
|
|
97
|
-
setStickyStyle(function (prev) {
|
|
98
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
99
|
-
position: defaultPostVal
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
setIsFixed(fixed);
|
|
103
|
-
}, [position, container, bottom]);
|
|
104
|
-
var handleScroll = useCallback(function () {
|
|
105
|
-
var containerEle = container === null || container === void 0 ? void 0 : container.current;
|
|
106
|
-
if (!rootRef.current && !containerEle) return;
|
|
107
|
-
var rootRect = getRect(rootRef.current);
|
|
108
|
-
var stCurrent = stickyRef.current;
|
|
109
|
-
var stickyRect = getRect(stCurrent);
|
|
110
|
-
var containerRect = getRect(containerEle);
|
|
111
|
-
if (rootRect.height) {
|
|
112
|
-
setRootStyle(function (prev) {
|
|
113
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
114
|
-
height: rootRect.height
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
if (position === 'top') {
|
|
119
|
-
// containerRect.bottom > top + stickyRect.height
|
|
120
|
-
if (containerEle) {
|
|
121
|
-
var fixed = top > rootRect.top && containerRect.bottom > 0;
|
|
122
|
-
var positionVal = fixed ? 'fixed' : 'inherit';
|
|
123
|
-
var diff = containerRect.bottom - top - stickyRect.height;
|
|
124
|
-
var transform = diff < 0 ? diff : 0;
|
|
125
|
-
setStickyStyle(function (prev) {
|
|
126
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
127
|
-
position: positionVal,
|
|
128
|
-
transform: "translate3d(0, ".concat(transform, "px, 0)")
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
setIsFixed(fixed);
|
|
132
|
-
} else {
|
|
133
|
-
var _fixed = top > rootRect.top;
|
|
134
|
-
var _positionVal = _fixed ? 'fixed' : 'inherit';
|
|
135
|
-
setStickyStyle(function (prev) {
|
|
136
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
137
|
-
position: _positionVal
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
setIsFixed(_fixed);
|
|
141
|
-
}
|
|
142
|
-
} else {
|
|
143
|
-
var clientHeight = document.documentElement.clientHeight;
|
|
144
|
-
if (containerEle) {
|
|
145
|
-
// clientHeight - bottom - stickyRect.height
|
|
146
|
-
var _fixed2 = containerRect.bottom > 0 && clientHeight - bottom - stickyRect.height > containerRect.top;
|
|
147
|
-
var _positionVal2 = _fixed2 ? 'fixed' : 'inherit';
|
|
148
|
-
var _diff = containerRect.bottom - (clientHeight - bottom);
|
|
149
|
-
var _transform = _diff < 0 ? _diff : 0;
|
|
150
|
-
setStickyStyle(function (prev) {
|
|
151
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
152
|
-
position: _positionVal2,
|
|
153
|
-
transform: "translate3d(0, ".concat(_transform, "px, 0)")
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
setIsFixed(_fixed2);
|
|
157
|
-
} else {
|
|
158
|
-
var _fixed3 = clientHeight - bottom < rootRect.bottom;
|
|
159
|
-
var _positionVal3 = _fixed3 ? 'fixed' : 'inherit';
|
|
160
|
-
setStickyStyle(function (prev) {
|
|
161
|
-
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
162
|
-
position: _positionVal3
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
setIsFixed(_fixed3);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}, [position, bottom, container, top]);
|
|
169
|
-
useWatch(isFixed, function () {
|
|
170
|
-
onChange && onChange(isFixed);
|
|
171
|
-
});
|
|
172
|
-
useEffect(function () {
|
|
173
|
-
var el = getElement();
|
|
174
|
-
el.addEventListener('scroll', handleScroll, false);
|
|
175
|
-
return function () {
|
|
176
|
-
el.removeEventListener('tap', handleScroll);
|
|
177
|
-
};
|
|
178
|
-
}, [getElement, handleScroll]);
|
|
179
|
-
return React__default.createElement("div", _objectSpread({
|
|
180
|
-
ref: rootRef,
|
|
181
|
-
style: rootStyle,
|
|
182
|
-
className: classNames(b(), className)
|
|
183
|
-
}, rest), React__default.createElement("div", {
|
|
184
|
-
// 应符合 bem 规范
|
|
185
|
-
className: "nut-sticky-box",
|
|
186
|
-
ref: stickyRef,
|
|
187
|
-
style: stickyStyle
|
|
188
|
-
}, children));
|
|
189
|
-
};
|
|
190
|
-
Sticky.defaultProps = defaultProps;
|
|
191
|
-
Sticky.displayName = 'NutSticky';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
192
13
|
export { Sticky as default };
|