@nutui/nutui-react-taro 1.3.4-beta.0 → 1.3.5-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 +12 -0
- package/dist/esm/Address.js +3 -4
- package/dist/esm/AnimatingNumbers.js +2 -2
- package/dist/esm/Audio.js +4 -4
- package/dist/esm/Cascader/style/index.js +2 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Dialog.js +2 -4
- package/dist/esm/ImagePreview/style/index.js +3 -1
- package/dist/esm/ImagePreview.js +3 -4
- package/dist/esm/Infiniteloading.js +2 -2
- package/dist/esm/Notify.js +2 -3
- package/dist/esm/Range.js +3 -3
- package/dist/esm/Rate.js +2 -2
- package/dist/esm/Swiper/style/index.js +1 -1
- package/dist/esm/Swiper.js +2 -2
- package/dist/esm/Toast.js +2 -2
- package/dist/esm/{address.taro-7540c626.js → address.taro-f16cef31.js} +76 -373
- package/dist/esm/{animatingnumbers.taro-877baa98.js → animatingnumbers.taro-6f40a2e9.js} +41 -25
- package/dist/esm/{audio.taro-ab2528b2.js → audio.taro-29f5568f.js} +1 -1
- package/dist/esm/{cascader.taro-35387092.js → cascader.taro-77100fb4.js} +54 -48
- package/dist/esm/dialog.taro-492e2b9a.js +218 -0
- package/dist/esm/{imagepreview.taro-3f1c7638.js → imagepreview.taro-1199e977.js} +3 -11
- package/dist/esm/{infiniteloading.taro-9701755f.js → infiniteloading.taro-b95e62bf.js} +1 -3
- package/dist/esm/notify.taro-d9c48fae.js +122 -0
- package/dist/esm/nutui-react.es.js +12 -12
- package/dist/esm/{range.taro-141a0163.js → range.taro-515d37a4.js} +1 -1
- package/dist/esm/{rate.taro-5077b962.js → rate.taro-69c85081.js} +4 -2
- package/dist/esm/{swiper.taro-58ed323b.js → swiper.taro-f314d67a.js} +4 -2
- package/dist/esm/{toast.taro-cd22a0d7.js → toast.taro-86862dff.js} +1 -1
- package/dist/esm/types/src/packages/address/customRender.taro.d.ts +15 -0
- package/dist/esm/types/src/packages/cascader/cascader.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascader.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/notify/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/notify/notify.taro.d.ts +9 -15
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +582 -1232
- package/dist/nutui.react.umd.js +577 -1227
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/types/index.d.ts +169 -174
- package/package.json +1 -1
- package/dist/esm/dialog.taro-54c67e08.js +0 -554
- package/dist/esm/notify.taro-0d9cfb07.js +0 -300
|
@@ -10,7 +10,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
import React__default, { useState, useRef } from 'react';
|
|
11
11
|
import Taro from '@tarojs/taro';
|
|
12
12
|
import { I as Icon } from './icon.taro-1d0d4fb7.js';
|
|
13
|
-
import { R as Range } from './range.taro-
|
|
13
|
+
import { R as Range } from './range.taro-515d37a4.js';
|
|
14
14
|
import { B as Button } from './button.taro-a9ebb937.js';
|
|
15
15
|
import { c as cn } from './bem-893ad28d.js';
|
|
16
16
|
import { u as useConfig } from './configprovider.taro-6c7b3056.js';
|
|
@@ -260,6 +260,7 @@ var Tree = /*#__PURE__*/function () {
|
|
|
260
260
|
var defaultProps = _objectSpread({
|
|
261
261
|
className: '',
|
|
262
262
|
style: {},
|
|
263
|
+
poppable: true,
|
|
263
264
|
visible: false,
|
|
264
265
|
options: [],
|
|
265
266
|
value: [],
|
|
@@ -282,6 +283,7 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
282
283
|
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
283
284
|
className = _defaultProps$props.className,
|
|
284
285
|
style = _defaultProps$props.style,
|
|
286
|
+
poppable = _defaultProps$props.poppable,
|
|
285
287
|
visible = _defaultProps$props.visible,
|
|
286
288
|
options = _defaultProps$props.options,
|
|
287
289
|
value = _defaultProps$props.value,
|
|
@@ -721,10 +723,57 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
721
723
|
};
|
|
722
724
|
}();
|
|
723
725
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
726
|
+
var renderItem = function renderItem() {
|
|
727
|
+
return React__default.createElement("div", {
|
|
728
|
+
className: "".concat(classes, " ").concat(className),
|
|
729
|
+
style: style
|
|
730
|
+
}, poppable && React__default.createElement("div", {
|
|
731
|
+
className: b('title')
|
|
732
|
+
}, title), React__default.createElement(Tabs, {
|
|
733
|
+
value: tabvalue,
|
|
734
|
+
titleNode: function titleNode() {
|
|
735
|
+
return optiosData.map(function (pane, index) {
|
|
736
|
+
var _pane$selectedNode, _pane$selectedNode2;
|
|
737
|
+
|
|
738
|
+
return React__default.createElement("div", {
|
|
739
|
+
onClick: function onClick() {
|
|
740
|
+
setTabvalue(pane.paneKey);
|
|
741
|
+
state.tabsCursor = index;
|
|
742
|
+
},
|
|
743
|
+
className: "nut-tabs__titles-item ".concat(tabvalue === pane.paneKey ? 'active' : ''),
|
|
744
|
+
key: pane.paneKey
|
|
745
|
+
}, React__default.createElement("span", {
|
|
746
|
+
className: "nut-tabs__titles-item__text"
|
|
747
|
+
}, !state.initLoading && state.panes.length && (pane === null || pane === void 0 ? void 0 : (_pane$selectedNode = pane.selectedNode) === null || _pane$selectedNode === void 0 ? void 0 : _pane$selectedNode.text), !state.initLoading && state.panes.length && !(pane !== null && pane !== void 0 && (_pane$selectedNode2 = pane.selectedNode) !== null && _pane$selectedNode2 !== void 0 && _pane$selectedNode2.text) && '请选择', !(!state.initLoading && state.panes.length) && 'Loading...'), React__default.createElement("span", {
|
|
748
|
+
className: "nut-tabs__titles-item__line"
|
|
749
|
+
}));
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
}, !state.initLoading && state.panes.length ? optiosData.map(function (pane) {
|
|
753
|
+
return React__default.createElement(TabPane, {
|
|
754
|
+
key: pane.paneKey,
|
|
755
|
+
paneKey: pane.paneKey
|
|
756
|
+
}, React__default.createElement("div", {
|
|
757
|
+
className: classesPane
|
|
758
|
+
}, pane.nodes && pane.nodes.map(function (node, index) {
|
|
759
|
+
var _pane$selectedNode3;
|
|
760
|
+
|
|
761
|
+
return React__default.createElement(CascaderItem, _objectSpread(_objectSpread({
|
|
762
|
+
key: index
|
|
763
|
+
}, props), {}, {
|
|
764
|
+
data: node,
|
|
765
|
+
checked: ((_pane$selectedNode3 = pane.selectedNode) === null || _pane$selectedNode3 === void 0 ? void 0 : _pane$selectedNode3.value) === node.value,
|
|
766
|
+
chooseItem: function chooseItem(node) {
|
|
767
|
+
return _chooseItem(node, false);
|
|
768
|
+
}
|
|
769
|
+
}));
|
|
770
|
+
})));
|
|
771
|
+
}) : React__default.createElement(TabPane, null, React__default.createElement("div", {
|
|
772
|
+
className: classesPane
|
|
773
|
+
}))));
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
return React__default.createElement(React__default.Fragment, null, poppable ? React__default.createElement(Popup, {
|
|
728
777
|
popClass: "cascadar-popup",
|
|
729
778
|
visible: visible,
|
|
730
779
|
position: "bottom",
|
|
@@ -734,50 +783,7 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
734
783
|
closeIcon: closeIcon,
|
|
735
784
|
onClickOverlay: closePopup,
|
|
736
785
|
onClickCloseIcon: closePopup
|
|
737
|
-
},
|
|
738
|
-
className: b('title')
|
|
739
|
-
}, title), React__default.createElement(Tabs, {
|
|
740
|
-
value: tabvalue,
|
|
741
|
-
titleNode: function titleNode() {
|
|
742
|
-
return optiosData.map(function (pane, index) {
|
|
743
|
-
var _pane$selectedNode, _pane$selectedNode2;
|
|
744
|
-
|
|
745
|
-
return React__default.createElement("div", {
|
|
746
|
-
onClick: function onClick() {
|
|
747
|
-
setTabvalue(pane.paneKey);
|
|
748
|
-
state.tabsCursor = index;
|
|
749
|
-
},
|
|
750
|
-
className: "nut-tabs__titles-item ".concat(tabvalue === pane.paneKey ? 'active' : ''),
|
|
751
|
-
key: pane.paneKey
|
|
752
|
-
}, React__default.createElement("span", {
|
|
753
|
-
className: "nut-tabs__titles-item__text"
|
|
754
|
-
}, !state.initLoading && state.panes.length && (pane === null || pane === void 0 ? void 0 : (_pane$selectedNode = pane.selectedNode) === null || _pane$selectedNode === void 0 ? void 0 : _pane$selectedNode.text), !state.initLoading && state.panes.length && !(pane !== null && pane !== void 0 && (_pane$selectedNode2 = pane.selectedNode) !== null && _pane$selectedNode2 !== void 0 && _pane$selectedNode2.text) && '请选择', !(!state.initLoading && state.panes.length) && 'Loading...'), React__default.createElement("span", {
|
|
755
|
-
className: "nut-tabs__titles-item__line"
|
|
756
|
-
}));
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
}, !state.initLoading && state.panes.length ? optiosData.map(function (pane) {
|
|
760
|
-
return React__default.createElement(TabPane, {
|
|
761
|
-
key: pane.paneKey,
|
|
762
|
-
paneKey: pane.paneKey
|
|
763
|
-
}, React__default.createElement("div", {
|
|
764
|
-
className: classesPane
|
|
765
|
-
}, pane.nodes && pane.nodes.map(function (node, index) {
|
|
766
|
-
var _pane$selectedNode3;
|
|
767
|
-
|
|
768
|
-
return React__default.createElement(CascaderItem, _objectSpread(_objectSpread({
|
|
769
|
-
key: index
|
|
770
|
-
}, props), {}, {
|
|
771
|
-
data: node,
|
|
772
|
-
checked: ((_pane$selectedNode3 = pane.selectedNode) === null || _pane$selectedNode3 === void 0 ? void 0 : _pane$selectedNode3.value) === node.value,
|
|
773
|
-
chooseItem: function chooseItem(node) {
|
|
774
|
-
return _chooseItem(node, false);
|
|
775
|
-
}
|
|
776
|
-
}));
|
|
777
|
-
})));
|
|
778
|
-
}) : React__default.createElement(TabPane, null, React__default.createElement("div", {
|
|
779
|
-
className: classesPane
|
|
780
|
-
})))));
|
|
786
|
+
}, renderItem()) : renderItem());
|
|
781
787
|
};
|
|
782
788
|
|
|
783
789
|
var Cascader = React__default.forwardRef(InternalCascader);
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
var _excluded = ["visible", "footer", "noOkBtn", "noCancelBtn", "lockScroll", "okBtnDisabled", "cancelAutoClose", "okText", "cancelText", "onClosed", "onCancel", "onOk"];
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import React__default, { forwardRef } from 'react';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import { B as Button } from './button.taro-a9ebb937.js';
|
|
13
|
+
import { CSSTransition } from 'react-transition-group';
|
|
14
|
+
import { u as useConfig } from './configprovider.taro-6c7b3056.js';
|
|
15
|
+
|
|
16
|
+
var Content = function Content(props) {
|
|
17
|
+
var visible = props.visible,
|
|
18
|
+
title = props.title,
|
|
19
|
+
footer = props.footer,
|
|
20
|
+
textAlign = props.textAlign,
|
|
21
|
+
footerDirection = props.footerDirection,
|
|
22
|
+
onClickSelf = props.onClickSelf,
|
|
23
|
+
children = props.children;
|
|
24
|
+
var headerNode;
|
|
25
|
+
|
|
26
|
+
if (title) {
|
|
27
|
+
headerNode = React__default.createElement("div", {
|
|
28
|
+
className: "nut-dialog__header"
|
|
29
|
+
}, title);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var footerNode;
|
|
33
|
+
|
|
34
|
+
if (footer) {
|
|
35
|
+
footerNode = React__default.createElement("div", {
|
|
36
|
+
className: classNames('nut-dialog__footer', _defineProperty({}, footerDirection, footerDirection))
|
|
37
|
+
}, footer);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var handleClick = function handleClick() {
|
|
41
|
+
onClickSelf && onClickSelf();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return React__default.createElement("div", {
|
|
45
|
+
className: "nut-dialog__outer",
|
|
46
|
+
onClick: handleClick
|
|
47
|
+
}, React__default.createElement("div", {
|
|
48
|
+
className: "nut-dialog",
|
|
49
|
+
style: {
|
|
50
|
+
display: visible ? 'flex' : 'none'
|
|
51
|
+
}
|
|
52
|
+
}, headerNode, React__default.createElement("div", {
|
|
53
|
+
className: "nut-dialog__content",
|
|
54
|
+
style: {
|
|
55
|
+
textAlign: textAlign
|
|
56
|
+
}
|
|
57
|
+
}, React__default.createElement("div", null, children)), footerNode));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
Content.displayName = 'NutContent';
|
|
61
|
+
|
|
62
|
+
function Mask(props) {
|
|
63
|
+
return React.createElement("div", {
|
|
64
|
+
className: "nut-dialog__mask"
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var DialogWrap = function DialogWrap(props) {
|
|
69
|
+
var className = props.className,
|
|
70
|
+
style = props.style,
|
|
71
|
+
visible = props.visible,
|
|
72
|
+
mask = props.mask,
|
|
73
|
+
closeOnClickOverlay = props.closeOnClickOverlay,
|
|
74
|
+
lockScroll = props.lockScroll,
|
|
75
|
+
onClosed = props.onClosed,
|
|
76
|
+
onCancel = props.onCancel;
|
|
77
|
+
|
|
78
|
+
var handleClick = function handleClick(e) {
|
|
79
|
+
if (closeOnClickOverlay && visible && e.target === e.currentTarget) {
|
|
80
|
+
onClosed === null || onClosed === void 0 ? void 0 : onClosed();
|
|
81
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
82
|
+
lockScroll && document.body.classList.remove('nut-overflow-hidden');
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var wrapStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
87
|
+
display: visible ? 'block' : 'none'
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
if (lockScroll && visible) {
|
|
91
|
+
document.body.classList.add('nut-overflow-hidden');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return React__default.createElement(React__default.Fragment, null, mask ? React__default.createElement(CSSTransition, {
|
|
95
|
+
"in": visible,
|
|
96
|
+
timeout: 300,
|
|
97
|
+
classNames: "fadeDialog",
|
|
98
|
+
unmountOnExit: true,
|
|
99
|
+
appear: true
|
|
100
|
+
}, React__default.createElement(Mask, null)) : null, React__default.createElement("div", {
|
|
101
|
+
className: classNames('nut-dialog__wrap', className),
|
|
102
|
+
onClick: handleClick,
|
|
103
|
+
style: wrapStyle
|
|
104
|
+
}, React__default.createElement(Content, _objectSpread(_objectSpread({}, props), {}, {
|
|
105
|
+
visible: visible
|
|
106
|
+
}))));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
DialogWrap.displayName = 'NutDialogWrap';
|
|
110
|
+
|
|
111
|
+
var DialogWrapper = function DialogWrapper(props) {
|
|
112
|
+
var visible = props.visible,
|
|
113
|
+
lockScroll = props.lockScroll;
|
|
114
|
+
|
|
115
|
+
if (lockScroll && !visible && document.body.classList.value.includes('nut-overflow-hidden')) {
|
|
116
|
+
document.body.classList.remove('nut-overflow-hidden');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return React__default.createElement("div", {
|
|
120
|
+
style: {
|
|
121
|
+
display: visible ? 'block' : 'none'
|
|
122
|
+
}
|
|
123
|
+
}, React__default.createElement(DialogWrap, _objectSpread({}, props)));
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
DialogWrapper.displayName = 'NutDialogWrapper';
|
|
127
|
+
var defaultProps = {
|
|
128
|
+
okText: '',
|
|
129
|
+
cancelText: '',
|
|
130
|
+
mask: true,
|
|
131
|
+
closeOnClickOverlay: true,
|
|
132
|
+
noFooter: false,
|
|
133
|
+
noOkBtn: false,
|
|
134
|
+
noCancelBtn: false,
|
|
135
|
+
okBtnDisabled: false,
|
|
136
|
+
cancelAutoClose: true,
|
|
137
|
+
textAlign: 'center',
|
|
138
|
+
footerDirection: 'horizontal',
|
|
139
|
+
lockScroll: false
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
var BaseDialog = function BaseDialog(props, ref) {
|
|
143
|
+
var _useConfig = useConfig(),
|
|
144
|
+
locale = _useConfig.locale;
|
|
145
|
+
|
|
146
|
+
var visible = props.visible,
|
|
147
|
+
footer = props.footer,
|
|
148
|
+
noOkBtn = props.noOkBtn,
|
|
149
|
+
noCancelBtn = props.noCancelBtn,
|
|
150
|
+
lockScroll = props.lockScroll,
|
|
151
|
+
okBtnDisabled = props.okBtnDisabled,
|
|
152
|
+
cancelAutoClose = props.cancelAutoClose,
|
|
153
|
+
okText = props.okText,
|
|
154
|
+
cancelText = props.cancelText,
|
|
155
|
+
onClosed = props.onClosed,
|
|
156
|
+
onCancel = props.onCancel,
|
|
157
|
+
onOk = props.onOk,
|
|
158
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
159
|
+
|
|
160
|
+
var renderFooter = function renderFooter() {
|
|
161
|
+
if (footer === null) return '';
|
|
162
|
+
|
|
163
|
+
var handleCancel = function handleCancel(e) {
|
|
164
|
+
e.stopPropagation();
|
|
165
|
+
if (!cancelAutoClose) return;
|
|
166
|
+
onClosed === null || onClosed === void 0 ? void 0 : onClosed();
|
|
167
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
168
|
+
|
|
169
|
+
if (lockScroll && visible) {
|
|
170
|
+
document.body.classList.remove('nut-overflow-hidden');
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
var handleOk = function handleOk(e) {
|
|
175
|
+
e.stopPropagation();
|
|
176
|
+
onClosed === null || onClosed === void 0 ? void 0 : onClosed();
|
|
177
|
+
onOk === null || onOk === void 0 ? void 0 : onOk(e);
|
|
178
|
+
|
|
179
|
+
if (lockScroll && visible) {
|
|
180
|
+
document.body.classList.remove('nut-overflow-hidden');
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
var footerContent = footer || React__default.createElement(React__default.Fragment, null, !noCancelBtn && React__default.createElement(Button, {
|
|
185
|
+
size: "small",
|
|
186
|
+
plain: true,
|
|
187
|
+
type: "primary",
|
|
188
|
+
className: "nut-dialog__footer-cancel",
|
|
189
|
+
onClick: function onClick(e) {
|
|
190
|
+
return handleCancel(e);
|
|
191
|
+
}
|
|
192
|
+
}, cancelText || locale.cancel), !noOkBtn && React__default.createElement(Button, {
|
|
193
|
+
size: "small",
|
|
194
|
+
type: "primary",
|
|
195
|
+
className: classNames('nut-dialog__footer-ok', {
|
|
196
|
+
disabled: okBtnDisabled
|
|
197
|
+
}),
|
|
198
|
+
disabled: okBtnDisabled,
|
|
199
|
+
onClick: function onClick(e) {
|
|
200
|
+
return handleOk(e);
|
|
201
|
+
}
|
|
202
|
+
}, okText));
|
|
203
|
+
return footerContent;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
return React__default.createElement(DialogWrapper, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
207
|
+
visible: visible,
|
|
208
|
+
lockScroll: lockScroll,
|
|
209
|
+
footer: renderFooter(),
|
|
210
|
+
onClosed: onClosed,
|
|
211
|
+
onCancel: onCancel
|
|
212
|
+
}));
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
var Dialog = forwardRef(BaseDialog);
|
|
216
|
+
Dialog.defaultProps = defaultProps;
|
|
217
|
+
Dialog.displayName = 'NutDialog';
|
|
218
|
+
export { Dialog as D };
|
|
@@ -7,8 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
|
|
8
8
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
9
9
|
import { P as Popup } from './popup.taro-33d0bbc8.js';
|
|
10
|
-
import {
|
|
11
|
-
import { S as Swiper } from './swiper.taro-58ed323b.js';
|
|
10
|
+
import { S as Swiper } from './swiper.taro-f314d67a.js';
|
|
12
11
|
import { S as SwiperItem } from './swiperitem-d00e7513.js';
|
|
13
12
|
var defaultProps = {
|
|
14
13
|
images: [],
|
|
@@ -232,14 +231,7 @@ var ImagePreview = function ImagePreview(props) {
|
|
|
232
231
|
initPage: initNo && (initNo > maxNo ? maxNo - 1 : initNo - 1),
|
|
233
232
|
paginationColor: paginationColor,
|
|
234
233
|
paginationVisible: paginationVisible
|
|
235
|
-
},
|
|
236
|
-
return React__default.createElement(SwiperItem, {
|
|
237
|
-
key: index
|
|
238
|
-
}, React__default.createElement(Video, {
|
|
239
|
-
source: item.source,
|
|
240
|
-
options: item.options
|
|
241
|
-
}));
|
|
242
|
-
}), images && images.length > 0 && images.map(function (item, index) {
|
|
234
|
+
}, images && images.length > 0 ? images.map(function (item, index) {
|
|
243
235
|
return React__default.createElement(SwiperItem, {
|
|
244
236
|
key: index
|
|
245
237
|
}, React__default.createElement("img", {
|
|
@@ -247,7 +239,7 @@ var ImagePreview = function ImagePreview(props) {
|
|
|
247
239
|
alt: "",
|
|
248
240
|
className: "nut-imagepreview-img"
|
|
249
241
|
}));
|
|
250
|
-
}))), React__default.createElement("div", {
|
|
242
|
+
}) : [])), React__default.createElement("div", {
|
|
251
243
|
className: "nut-imagepreview-index"
|
|
252
244
|
}, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)));
|
|
253
245
|
};
|
|
@@ -170,9 +170,7 @@ var Infiniteloading = function Infiniteloading(props) {
|
|
|
170
170
|
className: classes,
|
|
171
171
|
scrollY: true,
|
|
172
172
|
id: "scroller",
|
|
173
|
-
style:
|
|
174
|
-
height: '100%'
|
|
175
|
-
},
|
|
173
|
+
// style={{ height: '100%' }}
|
|
176
174
|
onScroll: scrollAction,
|
|
177
175
|
onScrollToLower: lower,
|
|
178
176
|
onTouchStart: touchStart,
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["id", "children", "style", "msg", "color", "background", "type", "className", "position", "isWrapTeleport", "visible", "duration", "onClosed", "onClick"];
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
+
|
|
10
|
+
import React__default, { useState, useEffect } from 'react';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import { CSSTransition } from 'react-transition-group';
|
|
13
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
14
|
+
var defaultProps = {
|
|
15
|
+
id: '',
|
|
16
|
+
msg: '',
|
|
17
|
+
color: '',
|
|
18
|
+
duration: 3000,
|
|
19
|
+
type: 'danger',
|
|
20
|
+
className: '',
|
|
21
|
+
background: '',
|
|
22
|
+
position: 'top',
|
|
23
|
+
isWrapTeleport: true,
|
|
24
|
+
visible: false,
|
|
25
|
+
onClosed: function onClosed() {},
|
|
26
|
+
onClick: function onClick() {}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var Notify = function Notify(props) {
|
|
30
|
+
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
31
|
+
id = _defaultProps$props.id,
|
|
32
|
+
children = _defaultProps$props.children,
|
|
33
|
+
style = _defaultProps$props.style,
|
|
34
|
+
msg = _defaultProps$props.msg,
|
|
35
|
+
color = _defaultProps$props.color,
|
|
36
|
+
background = _defaultProps$props.background,
|
|
37
|
+
type = _defaultProps$props.type,
|
|
38
|
+
className = _defaultProps$props.className,
|
|
39
|
+
position = _defaultProps$props.position,
|
|
40
|
+
isWrapTeleport = _defaultProps$props.isWrapTeleport,
|
|
41
|
+
visible = _defaultProps$props.visible,
|
|
42
|
+
duration = _defaultProps$props.duration,
|
|
43
|
+
onClosed = _defaultProps$props.onClosed,
|
|
44
|
+
onClick = _defaultProps$props.onClick,
|
|
45
|
+
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
46
|
+
|
|
47
|
+
var timer;
|
|
48
|
+
|
|
49
|
+
var _useState = useState(false),
|
|
50
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
+
showNotify = _useState2[0],
|
|
52
|
+
SetShow = _useState2[1];
|
|
53
|
+
|
|
54
|
+
useEffect(function () {
|
|
55
|
+
if (visible) {
|
|
56
|
+
SetShow(true);
|
|
57
|
+
show();
|
|
58
|
+
} else {
|
|
59
|
+
hide();
|
|
60
|
+
}
|
|
61
|
+
}, [visible]);
|
|
62
|
+
|
|
63
|
+
var clickHandle = function clickHandle() {
|
|
64
|
+
onClick();
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var show = function show() {
|
|
68
|
+
clearTimer();
|
|
69
|
+
|
|
70
|
+
if (duration) {
|
|
71
|
+
timer = setTimeout(function () {
|
|
72
|
+
hide();
|
|
73
|
+
}, duration);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var clearTimer = function clearTimer() {
|
|
78
|
+
if (timer) {
|
|
79
|
+
clearTimeout(timer);
|
|
80
|
+
timer = null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var hide = function hide() {
|
|
85
|
+
SetShow(false);
|
|
86
|
+
|
|
87
|
+
if (id) {
|
|
88
|
+
var element = document.getElementById(id);
|
|
89
|
+
element && element.parentNode && element.parentNode.removeChild(element);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onClosed();
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
cn('notify');
|
|
96
|
+
var classes = classNames(_defineProperty({
|
|
97
|
+
'popup-top': position === 'top',
|
|
98
|
+
'popup-bottom': position === 'bottom',
|
|
99
|
+
'nut-notify': true
|
|
100
|
+
}, "nut-notify--".concat(type), true));
|
|
101
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(CSSTransition, {
|
|
102
|
+
"in": showNotify,
|
|
103
|
+
timeout: 300,
|
|
104
|
+
classNames: "fade",
|
|
105
|
+
unmountOnExit: true,
|
|
106
|
+
appear: true,
|
|
107
|
+
position: position,
|
|
108
|
+
isWrapTeleport: isWrapTeleport,
|
|
109
|
+
id: id
|
|
110
|
+
}, React__default.createElement("div", {
|
|
111
|
+
className: "".concat(classes, " ").concat(className),
|
|
112
|
+
style: {
|
|
113
|
+
color: "".concat(color || ''),
|
|
114
|
+
background: "".concat(background || '')
|
|
115
|
+
},
|
|
116
|
+
onClick: clickHandle
|
|
117
|
+
}, children || msg)));
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
Notify.defaultProps = defaultProps;
|
|
121
|
+
Notify.displayName = 'NutNotify';
|
|
122
|
+
export { Notify as N };
|
|
@@ -26,7 +26,7 @@ export { S as SubSideNavBar } from './subsidenavbar.taro-2c1fcf16.js';
|
|
|
26
26
|
export { S as SideNavBarItem } from './sidenavbaritem.taro-77e077f4.js';
|
|
27
27
|
export { M as Menu } from './menu.taro-9345dcfd.js';
|
|
28
28
|
export { M as MenuItem } from './menuitem.taro-fc0961b7.js';
|
|
29
|
-
export { R as Range } from './range.taro-
|
|
29
|
+
export { R as Range } from './range.taro-515d37a4.js';
|
|
30
30
|
export { C as Calendar } from './calendar.taro-438940bd.js';
|
|
31
31
|
export { C as Checkbox } from './checkbox.taro-104557c1.js';
|
|
32
32
|
export { C as CheckboxGroup } from './checkboxgroup.taro-3d380042.js';
|
|
@@ -35,30 +35,30 @@ export { I as InputNumber } from './inputnumber.taro-0cf7c1b7.js';
|
|
|
35
35
|
export { I as Input } from './input.taro-2453d7c4.js';
|
|
36
36
|
export { R as Radio } from './radio.taro-95d43860.js';
|
|
37
37
|
export { R as RadioGroup } from './radiogroup.taro-b5dad516.js';
|
|
38
|
-
export { R as Rate } from './rate.taro-
|
|
38
|
+
export { R as Rate } from './rate.taro-69c85081.js';
|
|
39
39
|
export { C as CalendarItem } from './calendaritem.taro-11333579.js';
|
|
40
40
|
export { P as Picker } from './picker.taro-6a4dad23.js';
|
|
41
41
|
export { S as ShortPassword } from './shortpassword.taro-2e96ca22.js';
|
|
42
42
|
export { T as TextArea } from './textarea.taro-388d1f90.js';
|
|
43
43
|
export { U as Uploader } from './uploader.taro-6184abe7.js';
|
|
44
|
-
export { C as Cascader } from './cascader.taro-
|
|
44
|
+
export { C as Cascader } from './cascader.taro-77100fb4.js';
|
|
45
45
|
export { S as SearchBar } from './searchbar.taro-f134fb96.js';
|
|
46
46
|
export { N as NumberKeyboard } from './numberkeyboard.taro-53c350b8.js';
|
|
47
47
|
export { A as ActionSheet } from './actionsheet.taro-360d8d34.js';
|
|
48
48
|
export { B as BackTop } from './backtop.taro-aa8b2bc5.js';
|
|
49
49
|
export { D as Drag } from './drag.taro-56e8c87a.js';
|
|
50
|
-
export { D as Dialog } from './dialog.taro-
|
|
51
|
-
export { I as Infiniteloading } from './infiniteloading.taro-
|
|
52
|
-
export { N as Notify } from './notify.taro-
|
|
50
|
+
export { D as Dialog } from './dialog.taro-492e2b9a.js';
|
|
51
|
+
export { I as Infiniteloading } from './infiniteloading.taro-b95e62bf.js';
|
|
52
|
+
export { N as Notify } from './notify.taro-d9c48fae.js';
|
|
53
53
|
export { S as Switch } from './switch.taro-be5eb823.js';
|
|
54
|
-
export { T as Toast } from './toast.taro-
|
|
54
|
+
export { T as Toast } from './toast.taro-86862dff.js';
|
|
55
55
|
export { S as Swipe } from './swipe.taro-dfb9a049.js';
|
|
56
56
|
export { P as PullToRefresh } from './pulltorefresh.taro-e66c78ad.js';
|
|
57
57
|
export { C as CircleProgress } from './circleprogress.taro-3c89a157.js';
|
|
58
58
|
export { N as NoticeBar } from './noticebar.taro-1fa04a96.js';
|
|
59
59
|
export { S as Steps } from './steps.taro-943f4fbb.js';
|
|
60
60
|
export { S as Step } from './step.taro-f1057500.js';
|
|
61
|
-
export { S as Swiper } from './swiper.taro-
|
|
61
|
+
export { S as Swiper } from './swiper.taro-f314d67a.js';
|
|
62
62
|
export { S as SwiperItem } from './swiperitem-d00e7513.js';
|
|
63
63
|
export { A as Avatar } from './avatar.taro-ec620cdd.js';
|
|
64
64
|
export { A as AvatarGroup } from './avatargroup-5b2584d9.js';
|
|
@@ -70,15 +70,15 @@ export { S as Skeleton } from './skeleton.taro-b9ff84b9.js';
|
|
|
70
70
|
export { C as CountDown } from './countdown.taro-f2d9ffed.js';
|
|
71
71
|
export { C as Collapse } from './collapse.taro-72e58ba2.js';
|
|
72
72
|
export { C as CollapseItem } from './collapseitem-75843a5e.js';
|
|
73
|
-
export { A as AnimatingNumbers } from './animatingnumbers.taro-
|
|
73
|
+
export { A as AnimatingNumbers } from './animatingnumbers.taro-6f40a2e9.js';
|
|
74
74
|
export { E as Empty } from './empty.taro-ab9c4f03.js';
|
|
75
75
|
export { V as VirtualList } from './virtuallist.taro-6858f690.js';
|
|
76
76
|
export { T as Table } from './table.taro-7ac89a6c.js';
|
|
77
77
|
export { V as Video } from './video-c1090c92.js';
|
|
78
78
|
export { P as Progress } from './progress.taro-623bc807.js';
|
|
79
|
-
export { A as Audio } from './audio.taro-
|
|
80
|
-
export { I as ImagePreview } from './imagepreview.taro-
|
|
81
|
-
export { A as Address } from './address.taro-
|
|
79
|
+
export { A as Audio } from './audio.taro-29f5568f.js';
|
|
80
|
+
export { I as ImagePreview } from './imagepreview.taro-1199e977.js';
|
|
81
|
+
export { A as Address } from './address.taro-f16cef31.js';
|
|
82
82
|
export { B as Barrage } from './barrage.taro-d86c367a.js';
|
|
83
83
|
export { S as Signature } from './signature.taro-a9286cd1.js';
|
|
84
84
|
export { C as Card } from './card.taro-1bc35ebe.js';
|
|
@@ -10,7 +10,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
import React__default, { useState, useRef, useEffect, useCallback } from 'react';
|
|
11
11
|
import { u as useTouch } from './useTouch-a2ea68c6.js';
|
|
12
12
|
import { g as getRectByTaro } from './useClientRect-8b7cc406.js';
|
|
13
|
-
import { T as Toast } from './toast.taro-
|
|
13
|
+
import { T as Toast } from './toast.taro-86862dff.js';
|
|
14
14
|
import { u as useConfig } from './configprovider.taro-6c7b3056.js';
|
|
15
15
|
var defaultProps = {
|
|
16
16
|
range: false,
|
|
@@ -70,7 +70,7 @@ var Rate = function Rate(props) {
|
|
|
70
70
|
}, [modelValue]);
|
|
71
71
|
|
|
72
72
|
var pxCheck = function pxCheck(value) {
|
|
73
|
-
return isNaN(Number(value)) ? String(value) : "".concat(value, "px");
|
|
73
|
+
return Number.isNaN(Number(value)) ? String(value) : "".concat(value, "px");
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var _onClick = function onClick(e, index) {
|
|
@@ -78,9 +78,11 @@ var Rate = function Rate(props) {
|
|
|
78
78
|
e.stopPropagation();
|
|
79
79
|
if (disabled || readonly) return;
|
|
80
80
|
var value = 0;
|
|
81
|
-
|
|
81
|
+
|
|
82
|
+
if (!(index === 1 && score === index)) {
|
|
82
83
|
value = index;
|
|
83
84
|
}
|
|
85
|
+
|
|
84
86
|
value = Math.max(value, Number(minimizeValue));
|
|
85
87
|
setScore(value);
|
|
86
88
|
onChange && onChange(value);
|
|
@@ -12,7 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
|
|
13
13
|
import React__default, { useRef, useState, useMemo, useEffect } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { nextTick, useReady, createSelectorQuery } from '@tarojs/taro';
|
|
16
16
|
import { D as DataContext } from './UserContext-b4181162.js';
|
|
17
17
|
import { c as cn } from './bem-893ad28d.js';
|
|
18
18
|
var defaultProps = {
|
|
@@ -528,7 +528,9 @@ var Swiper = React__default.forwardRef(function (props, ref) {
|
|
|
528
528
|
autoplay();
|
|
529
529
|
}, [children]);
|
|
530
530
|
useEffect(function () {
|
|
531
|
-
|
|
531
|
+
nextTick(function () {
|
|
532
|
+
init();
|
|
533
|
+
});
|
|
532
534
|
}, [propSwiper.initPage]);
|
|
533
535
|
useEffect(function () {
|
|
534
536
|
return function () {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { RegionData, NextListObj } from './type';
|
|
3
|
+
export interface AddressProps {
|
|
4
|
+
modelValue: (string | number)[];
|
|
5
|
+
type: string;
|
|
6
|
+
province: RegionData[];
|
|
7
|
+
city: RegionData[];
|
|
8
|
+
country: RegionData[];
|
|
9
|
+
town: RegionData[];
|
|
10
|
+
height: string | number;
|
|
11
|
+
onNextArea?: (cal: NextListObj) => void;
|
|
12
|
+
onTabClick?: (type: string) => void;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CustomRender: FunctionComponent<Partial<AddressProps> & React.HTMLAttributes<HTMLDivElement>>;
|