@nutui/nutui-react-taro 3.0.19-cpp.26-beta.4 → 3.0.19-cpp.27
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/cjs/locales/base.d.ts +5 -0
- package/dist/cjs/locales/en-US.js +5 -0
- package/dist/cjs/locales/id-ID.js +5 -0
- package/dist/cjs/locales/ja-JP.js +6 -1
- package/dist/cjs/locales/tr-TR.js +5 -0
- package/dist/cjs/locales/zh-CN.js +5 -0
- package/dist/cjs/locales/zh-TW.js +5 -0
- package/dist/cjs/locales/zh-UG.js +5 -0
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +7 -7
- package/dist/cjs/packages/address/address.d.ts +1 -1
- package/dist/cjs/packages/address/style/style.harmony.css +7 -7
- package/dist/cjs/packages/animatingnumbers/countup.js +3 -1
- package/dist/cjs/packages/avatar/avatar.js +32 -6
- package/dist/cjs/packages/badge/badge.js +16 -3
- package/dist/cjs/packages/button/button.d.ts +2 -21
- package/dist/cjs/packages/button/button.js +2 -3
- package/dist/cjs/packages/button/index.d.ts +0 -1
- package/dist/cjs/packages/calendar/style/style.harmony.css +7 -7
- package/dist/cjs/packages/cascader/style/style.harmony.css +7 -7
- package/dist/cjs/packages/datepicker/style/style.harmony.css +7 -7
- package/dist/cjs/packages/dialog/dialog.js +6 -2
- package/dist/cjs/packages/divider/divider.js +2 -2
- package/dist/cjs/packages/empty/empty.d.ts +4 -4
- package/dist/cjs/packages/image/image.js +11 -3
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +7 -7
- package/dist/cjs/packages/input/input.js +10 -3
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +7 -7
- package/dist/cjs/packages/picker/style/style.harmony.css +7 -7
- package/dist/cjs/packages/popover/style/style.harmony.css +7 -7
- package/dist/cjs/packages/popup/style/popup.scss +8 -7
- package/dist/cjs/packages/popup/style/style.css +7 -7
- package/dist/cjs/packages/popup/style/style.harmony.css +7 -7
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +8 -7
- package/dist/cjs/packages/popup/style-jmapp/style.css +7 -7
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +8 -7
- package/dist/cjs/packages/popup/style-jrkf/style.css +7 -7
- package/dist/cjs/packages/progress/progress.js +2 -4
- package/dist/cjs/packages/quickenter/quickenter.js +21 -15
- package/dist/cjs/packages/quickenter/style/quickenter.scss +10 -2
- package/dist/cjs/packages/quickenter/style/style.css +7 -1
- package/dist/cjs/packages/quickenter/style/style.harmony.css +13 -8
- package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +10 -2
- package/dist/cjs/packages/quickenter/style-jmapp/style.css +7 -1
- package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +10 -2
- package/dist/cjs/packages/quickenter/style-jrkf/style.css +7 -1
- package/dist/cjs/packages/resultpage/resultpage.js +2 -1
- package/dist/cjs/packages/searchbar/searchbar.js +23 -9
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +7 -7
- package/dist/cjs/packages/swipe/swipe.d.ts +1 -1
- package/dist/cjs/packages/tabs/tabs.js +12 -5
- package/dist/cjs/packages/timeselect/style/style.harmony.css +7 -7
- package/dist/cjs/packages/tour/style/style.harmony.css +7 -7
- package/dist/cjs/types/spec/button/base.d.ts +2 -1
- package/dist/cjs/types/spec/button/taro.d.ts +5 -1
- package/dist/cjs/types/spec/quickenter/base.d.ts +1 -0
- package/dist/cjs/utils/taro/get-rect.js +4 -2
- package/dist/es/locales/base.d.ts +5 -0
- package/dist/es/locales/en-US.js +5 -0
- package/dist/es/locales/id-ID.js +5 -0
- package/dist/es/locales/ja-JP.js +6 -1
- package/dist/es/locales/tr-TR.js +5 -0
- package/dist/es/locales/zh-CN.js +5 -0
- package/dist/es/locales/zh-TW.js +5 -0
- package/dist/es/locales/zh-UG.js +5 -0
- package/dist/es/packages/actionsheet/style/style.harmony.css +7 -7
- package/dist/es/packages/address/address.d.ts +1 -1
- package/dist/es/packages/address/style/style.harmony.css +7 -7
- package/dist/es/packages/animatingnumbers/countup.js +3 -1
- package/dist/es/packages/avatar/avatar.js +32 -6
- package/dist/es/packages/badge/badge.js +16 -3
- package/dist/es/packages/button/button.d.ts +2 -21
- package/dist/es/packages/button/button.js +2 -4
- package/dist/es/packages/button/index.d.ts +0 -1
- package/dist/es/packages/calendar/style/style.harmony.css +7 -7
- package/dist/es/packages/cascader/style/style.harmony.css +7 -7
- package/dist/es/packages/datepicker/style/style.harmony.css +7 -7
- package/dist/es/packages/dialog/dialog.js +6 -2
- package/dist/es/packages/divider/divider.js +1 -1
- package/dist/es/packages/empty/empty.d.ts +4 -4
- package/dist/es/packages/image/image.js +11 -3
- package/dist/es/packages/imagepreview/style/style.harmony.css +7 -7
- package/dist/es/packages/input/input.js +10 -3
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +7 -7
- package/dist/es/packages/picker/style/style.harmony.css +7 -7
- package/dist/es/packages/popover/style/style.harmony.css +7 -7
- package/dist/es/packages/popup/popup.js +1 -2
- package/dist/es/packages/popup/style/popup.scss +8 -7
- package/dist/es/packages/popup/style/style.css +7 -7
- package/dist/es/packages/popup/style/style.harmony.css +7 -7
- package/dist/es/packages/popup/style-jmapp/popup.scss +8 -7
- package/dist/es/packages/popup/style-jmapp/style.css +7 -7
- package/dist/es/packages/popup/style-jrkf/popup.scss +8 -7
- package/dist/es/packages/popup/style-jrkf/style.css +7 -7
- package/dist/es/packages/progress/progress.js +2 -4
- package/dist/es/packages/quickenter/quickenter.js +19 -13
- package/dist/es/packages/quickenter/style/quickenter.scss +10 -2
- package/dist/es/packages/quickenter/style/style.css +7 -1
- package/dist/es/packages/quickenter/style/style.harmony.css +13 -8
- package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +10 -2
- package/dist/es/packages/quickenter/style-jmapp/style.css +7 -1
- package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +10 -2
- package/dist/es/packages/quickenter/style-jrkf/style.css +7 -1
- package/dist/es/packages/resultpage/resultpage.js +2 -1
- package/dist/es/packages/searchbar/searchbar.js +23 -9
- package/dist/es/packages/shortpassword/style/style.harmony.css +7 -7
- package/dist/es/packages/swipe/swipe.d.ts +1 -1
- package/dist/es/packages/tabs/tabs.js +12 -5
- package/dist/es/packages/timeselect/style/style.harmony.css +7 -7
- package/dist/es/packages/tour/style/style.harmony.css +7 -7
- package/dist/es/types/spec/button/base.d.ts +2 -1
- package/dist/es/types/spec/button/taro.d.ts +5 -1
- package/dist/es/types/spec/quickenter/base.d.ts +1 -0
- package/dist/es/utils/taro/get-rect.js +4 -2
- package/dist/nutui.react.umd.js +1127 -102
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +34 -34
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +42 -42
- package/dist/style.css +1 -1
- package/dist/style.scss +36 -36
- package/dist/styles/jd-font.scss +2 -2
- package/dist/styles/themes/daojia.css +1 -1
- package/dist/styles/themes/dark-daojia.css +1 -1
- package/dist/styles/themes/dark.css +1 -1
- package/dist/styles/themes/default.css +1 -1
- package/package.json +1 -1
|
@@ -21,18 +21,18 @@ var _taro = /*#__PURE__*/ _interop_require_default._(require("@tarojs/taro"));
|
|
|
21
21
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
22
22
|
var _iconsreacttaro = require("@nutui/icons-react-taro");
|
|
23
23
|
var _index = /*#__PURE__*/ _interop_require_default._(require("../popup/index"));
|
|
24
|
-
var _index1 = /*#__PURE__*/ _interop_require_default._(require("../safearea/index"));
|
|
25
24
|
var _typings = require("../../utils/typings");
|
|
26
25
|
var _usepropsvalue = require("../../hooks/use-props-value");
|
|
27
|
-
var
|
|
26
|
+
var _index1 = /*#__PURE__*/ _interop_require_default._(require("../badge/index"));
|
|
28
27
|
var _configprovider = require("../configprovider");
|
|
29
28
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
30
29
|
options: [],
|
|
31
30
|
visible: false,
|
|
32
|
-
closeOnOverlayClick: true
|
|
31
|
+
closeOnOverlayClick: true,
|
|
32
|
+
safeAreaInsetTop: true
|
|
33
33
|
});
|
|
34
34
|
var InternalQuickEnter = function InternalQuickEnter(props, ref) {
|
|
35
|
-
var _ref = (0, _object_spread._)({}, defaultProps, props), children = _ref.children, visible = _ref.visible, title = _ref.title, _ref_options = _ref.options, options = _ref_options === void 0 ? [] : _ref_options, closeOnOverlayClick = _ref.closeOnOverlayClick, _ref_popupProps = _ref.popupProps, popupProps = _ref_popupProps === void 0 ? {} : _ref_popupProps, className = _ref.className, style = _ref.style, onClose = _ref.onClose, onChange = _ref.onChange, closeIcon = _ref.closeIcon, rest = (0, _object_without_properties._)(_ref, [
|
|
35
|
+
var _ref = (0, _object_spread._)({}, defaultProps, props), children = _ref.children, visible = _ref.visible, title = _ref.title, _ref_options = _ref.options, options = _ref_options === void 0 ? [] : _ref_options, closeOnOverlayClick = _ref.closeOnOverlayClick, _ref_popupProps = _ref.popupProps, popupProps = _ref_popupProps === void 0 ? {} : _ref_popupProps, className = _ref.className, style = _ref.style, onClose = _ref.onClose, onChange = _ref.onChange, closeIcon = _ref.closeIcon, safeAreaInsetTop = _ref.safeAreaInsetTop, rest = (0, _object_without_properties._)(_ref, [
|
|
36
36
|
"children",
|
|
37
37
|
"visible",
|
|
38
38
|
"title",
|
|
@@ -43,12 +43,15 @@ var InternalQuickEnter = function InternalQuickEnter(props, ref) {
|
|
|
43
43
|
"style",
|
|
44
44
|
"onClose",
|
|
45
45
|
"onChange",
|
|
46
|
-
"closeIcon"
|
|
46
|
+
"closeIcon",
|
|
47
|
+
"safeAreaInsetTop"
|
|
47
48
|
]);
|
|
48
49
|
var locale = (0, _configprovider.useConfig)().locale;
|
|
49
50
|
var mergedTitle = title || locale.quickenter.title;
|
|
50
51
|
var classPrefix = 'nut-quickenter';
|
|
51
|
-
var classes = (0, _classnames.default)(classPrefix, className
|
|
52
|
+
var classes = (0, _classnames.default)(classPrefix, className, {
|
|
53
|
+
'safe-area-top': safeAreaInsetTop
|
|
54
|
+
});
|
|
52
55
|
var _usePropsValue = (0, _sliced_to_array._)((0, _usepropsvalue.usePropsValue)({
|
|
53
56
|
value: props.visible,
|
|
54
57
|
defaultValue: false,
|
|
@@ -93,7 +96,9 @@ var InternalQuickEnter = function InternalQuickEnter(props, ref) {
|
|
|
93
96
|
e.stopPropagation();
|
|
94
97
|
onCancelEvent();
|
|
95
98
|
}
|
|
96
|
-
}, closeIcon || /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close,
|
|
99
|
+
}, closeIcon || /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
|
|
100
|
+
ariaLabel: locale.close
|
|
101
|
+
})));
|
|
97
102
|
};
|
|
98
103
|
var renderContent = function renderContent() {
|
|
99
104
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
@@ -101,20 +106,23 @@ var InternalQuickEnter = function InternalQuickEnter(props, ref) {
|
|
|
101
106
|
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
102
107
|
className: "".concat(classPrefix, "-list")
|
|
103
108
|
}, options.map(function(item, index) {
|
|
104
|
-
var _item_badgeProps;
|
|
105
|
-
var _item_badge;
|
|
109
|
+
var _item_badgeProps, _item_badgeProps1;
|
|
110
|
+
var _item_badge, _item_badge1;
|
|
106
111
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
107
112
|
key: index,
|
|
108
113
|
className: "".concat(classPrefix, "-item"),
|
|
114
|
+
ariaLabel: "".concat(item.title, " ").concat((_item_badge = item.badge) !== null && _item_badge !== void 0 ? _item_badge : (_item_badgeProps = item.badgeProps) === null || _item_badgeProps === void 0 ? void 0 : _item_badgeProps.value),
|
|
109
115
|
onClick: function onClick() {
|
|
110
116
|
return handleItemClick(item, index);
|
|
111
117
|
}
|
|
112
118
|
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
113
|
-
className: "".concat(classPrefix, "-item-icon")
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
className: "".concat(classPrefix, "-item-icon"),
|
|
120
|
+
ariaHidden: true
|
|
121
|
+
}, /*#__PURE__*/ _react.default.createElement(_index1.default, (0, _object_spread_props._)((0, _object_spread._)({}, item.badgeProps), {
|
|
122
|
+
value: (_item_badge1 = item.badge) !== null && _item_badge1 !== void 0 ? _item_badge1 : (_item_badgeProps1 = item.badgeProps) === null || _item_badgeProps1 === void 0 ? void 0 : _item_badgeProps1.value
|
|
116
123
|
}), item.icon)), /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
117
|
-
className: "".concat(classPrefix, "-item-title")
|
|
124
|
+
className: "".concat(classPrefix, "-item-title"),
|
|
125
|
+
ariaHidden: true
|
|
118
126
|
}, item.title));
|
|
119
127
|
})));
|
|
120
128
|
};
|
|
@@ -139,8 +147,6 @@ var InternalQuickEnter = function InternalQuickEnter(props, ref) {
|
|
|
139
147
|
onCancelEvent();
|
|
140
148
|
},
|
|
141
149
|
onClose: onCancelEvent
|
|
142
|
-
}), /*#__PURE__*/ _react.default.createElement(_index1.default, {
|
|
143
|
-
position: "top"
|
|
144
150
|
}), renderQuickEnterElement()));
|
|
145
151
|
};
|
|
146
152
|
var QuickEnter = /*#__PURE__*/ _react.default.forwardRef(InternalQuickEnter);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.nut-quickenter {
|
|
2
2
|
width: 100%;
|
|
3
|
-
|
|
3
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
4
|
+
max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
|
|
4
5
|
background: $quickenter-bg-color;
|
|
5
6
|
border-radius: 0 0 12px 12px;
|
|
6
7
|
overflow: hidden;
|
|
@@ -10,6 +11,13 @@
|
|
|
10
11
|
box-shadow: $quickenter-box-shadow;
|
|
11
12
|
// backdrop-filter: $quickenter-backdrop-filter;
|
|
12
13
|
|
|
14
|
+
&.safe-area-top {
|
|
15
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
16
|
+
padding-top: calc(
|
|
17
|
+
env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
&-control {
|
|
14
22
|
display: flex;
|
|
15
23
|
align-items: center;
|
|
@@ -44,7 +52,7 @@
|
|
|
44
52
|
&-content {
|
|
45
53
|
flex: 1;
|
|
46
54
|
padding: 10px 28px;
|
|
47
|
-
overflow-y: hidden; //
|
|
55
|
+
overflow-y: hidden; // 始终可滚动,防止内容被遮挡
|
|
48
56
|
box-sizing: border-box;
|
|
49
57
|
|
|
50
58
|
&-scrollable {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
/* #ifdef harmony */
|
|
2
3
|
/* #endif */
|
|
3
4
|
/* #ifndef harmony */
|
|
4
5
|
/* #endif */
|
|
5
6
|
.nut-quickenter {
|
|
6
7
|
width: 100%;
|
|
7
|
-
|
|
8
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
9
|
+
max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
|
|
8
10
|
background: var(--nutui-quickenter-bg-color, #f5f5f5);
|
|
9
11
|
border-radius: 0 0 12px 12px;
|
|
10
12
|
overflow: hidden;
|
|
@@ -13,6 +15,10 @@
|
|
|
13
15
|
flex-direction: column;
|
|
14
16
|
box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
|
|
15
17
|
}
|
|
18
|
+
.nut-quickenter.safe-area-top {
|
|
19
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
20
|
+
padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
|
|
21
|
+
}
|
|
16
22
|
.nut-quickenter-control {
|
|
17
23
|
display: flex;
|
|
18
24
|
align-items: center;
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -405,7 +405,8 @@
|
|
|
405
405
|
|
|
406
406
|
.nut-quickenter {
|
|
407
407
|
width: 100%;
|
|
408
|
-
|
|
408
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
409
|
+
max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
|
|
409
410
|
background: var(--nutui-quickenter-bg-color, #f5f5f5);
|
|
410
411
|
border-radius: 0 0 12px 12px;
|
|
411
412
|
overflow: hidden;
|
|
@@ -414,6 +415,10 @@
|
|
|
414
415
|
flex-direction: column;
|
|
415
416
|
box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
|
|
416
417
|
}
|
|
418
|
+
.nut-quickenter.safe-area-top {
|
|
419
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
420
|
+
padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
|
|
421
|
+
}
|
|
417
422
|
.nut-quickenter-control {
|
|
418
423
|
display: flex;
|
|
419
424
|
align-items: center;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.nut-quickenter {
|
|
2
2
|
width: 100%;
|
|
3
|
-
|
|
3
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
4
|
+
max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
|
|
4
5
|
background: $quickenter-bg-color;
|
|
5
6
|
border-radius: 0 0 12px 12px;
|
|
6
7
|
overflow: hidden;
|
|
@@ -10,6 +11,13 @@
|
|
|
10
11
|
box-shadow: $quickenter-box-shadow;
|
|
11
12
|
// backdrop-filter: $quickenter-backdrop-filter;
|
|
12
13
|
|
|
14
|
+
&.safe-area-top {
|
|
15
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
16
|
+
padding-top: calc(
|
|
17
|
+
env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
&-control {
|
|
14
22
|
display: flex;
|
|
15
23
|
align-items: center;
|
|
@@ -44,7 +52,7 @@
|
|
|
44
52
|
&-content {
|
|
45
53
|
flex: 1;
|
|
46
54
|
padding: 10px 28px;
|
|
47
|
-
overflow-y: hidden; //
|
|
55
|
+
overflow-y: hidden; // 始终可滚动,防止内容被遮挡
|
|
48
56
|
box-sizing: border-box;
|
|
49
57
|
|
|
50
58
|
&-scrollable {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
/* #ifdef harmony */
|
|
2
3
|
/* #endif */
|
|
3
4
|
/* #ifndef harmony */
|
|
4
5
|
/* #endif */
|
|
5
6
|
.nut-quickenter {
|
|
6
7
|
width: 100%;
|
|
7
|
-
|
|
8
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
9
|
+
max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
|
|
8
10
|
background: var(--nutui-quickenter-bg-color, #f5f5f5);
|
|
9
11
|
border-radius: 0 0 12px 12px;
|
|
10
12
|
overflow: hidden;
|
|
@@ -13,6 +15,10 @@
|
|
|
13
15
|
flex-direction: column;
|
|
14
16
|
box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
|
|
15
17
|
}
|
|
18
|
+
.nut-quickenter.safe-area-top {
|
|
19
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
20
|
+
padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
|
|
21
|
+
}
|
|
16
22
|
.nut-quickenter-control {
|
|
17
23
|
display: flex;
|
|
18
24
|
align-items: center;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.nut-quickenter {
|
|
2
2
|
width: 100%;
|
|
3
|
-
|
|
3
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
4
|
+
max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
|
|
4
5
|
background: $quickenter-bg-color;
|
|
5
6
|
border-radius: 0 0 12px 12px;
|
|
6
7
|
overflow: hidden;
|
|
@@ -10,6 +11,13 @@
|
|
|
10
11
|
box-shadow: $quickenter-box-shadow;
|
|
11
12
|
// backdrop-filter: $quickenter-backdrop-filter;
|
|
12
13
|
|
|
14
|
+
&.safe-area-top {
|
|
15
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
16
|
+
padding-top: calc(
|
|
17
|
+
env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
&-control {
|
|
14
22
|
display: flex;
|
|
15
23
|
align-items: center;
|
|
@@ -44,7 +52,7 @@
|
|
|
44
52
|
&-content {
|
|
45
53
|
flex: 1;
|
|
46
54
|
padding: 10px 28px;
|
|
47
|
-
overflow-y: hidden; //
|
|
55
|
+
overflow-y: hidden; // 始终可滚动,防止内容被遮挡
|
|
48
56
|
box-sizing: border-box;
|
|
49
57
|
|
|
50
58
|
&-scrollable {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
/* #ifdef harmony */
|
|
2
3
|
/* #endif */
|
|
3
4
|
/* #ifndef harmony */
|
|
4
5
|
/* #endif */
|
|
5
6
|
.nut-quickenter {
|
|
6
7
|
width: 100%;
|
|
7
|
-
|
|
8
|
+
/* 限制弹层最大高度,包含安全区 */
|
|
9
|
+
max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
|
|
8
10
|
background: var(--nutui-quickenter-bg-color, #f5f5f5);
|
|
9
11
|
border-radius: 0 0 12px 12px;
|
|
10
12
|
overflow: hidden;
|
|
@@ -13,6 +15,10 @@
|
|
|
13
15
|
flex-direction: column;
|
|
14
16
|
box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
|
|
15
17
|
}
|
|
18
|
+
.nut-quickenter.safe-area-top {
|
|
19
|
+
/* 使用 env fallback,确保旧浏览器返回 0 */
|
|
20
|
+
padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
|
|
21
|
+
}
|
|
16
22
|
.nut-quickenter-control {
|
|
17
23
|
display: flex;
|
|
18
24
|
align-items: center;
|
|
@@ -50,7 +50,8 @@ var ResultPage = function ResultPage(props) {
|
|
|
50
50
|
className: cls,
|
|
51
51
|
style: style
|
|
52
52
|
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
53
|
-
className: "".concat(classPrefix, "-icon")
|
|
53
|
+
className: "".concat(classPrefix, "-icon"),
|
|
54
|
+
ariaHidden: true
|
|
54
55
|
}, icon || defaultStatus[status]), typeof title === 'string' && title ? /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
55
56
|
className: "".concat(classPrefix, "-title")
|
|
56
57
|
}, title) : title, typeof description === 'string' && description ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
@@ -34,7 +34,9 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
|
|
|
34
34
|
left: '',
|
|
35
35
|
right: '',
|
|
36
36
|
rightIn: '',
|
|
37
|
-
leftIn: /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Search,
|
|
37
|
+
leftIn: /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Search, {
|
|
38
|
+
ariaHidden: true
|
|
39
|
+
}),
|
|
38
40
|
tag: false
|
|
39
41
|
});
|
|
40
42
|
var SearchBar = function SearchBar(props) {
|
|
@@ -189,12 +191,15 @@ var SearchBar = function SearchBar(props) {
|
|
|
189
191
|
onClick: function onClick(e) {
|
|
190
192
|
return onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, e);
|
|
191
193
|
}
|
|
192
|
-
}, item, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close,
|
|
194
|
+
}, item, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
|
|
195
|
+
ariaLabel: locale.close
|
|
196
|
+
}));
|
|
193
197
|
}));
|
|
194
198
|
}, [
|
|
195
199
|
value,
|
|
196
200
|
onItemClick,
|
|
197
|
-
innerTag
|
|
201
|
+
innerTag,
|
|
202
|
+
locale.close
|
|
198
203
|
]);
|
|
199
204
|
var renderLeftIn = (0, _react.useCallback)(function() {
|
|
200
205
|
if (!leftIn) return null;
|
|
@@ -207,11 +212,16 @@ var SearchBar = function SearchBar(props) {
|
|
|
207
212
|
var renderLeft = (0, _react.useCallback)(function() {
|
|
208
213
|
if (!backable && !left) return null;
|
|
209
214
|
return /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
210
|
-
className: "".concat(classPrefix, "-left")
|
|
211
|
-
|
|
215
|
+
className: "".concat(classPrefix, "-left"),
|
|
216
|
+
ariaRole: backable ? 'button' : undefined,
|
|
217
|
+
ariaLabel: backable ? locale.back : undefined
|
|
218
|
+
}, backable ? /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.ArrowLeft, {
|
|
219
|
+
ariaHidden: true
|
|
220
|
+
}) : left);
|
|
212
221
|
}, [
|
|
213
222
|
backable,
|
|
214
|
-
left
|
|
223
|
+
left,
|
|
224
|
+
locale
|
|
215
225
|
]);
|
|
216
226
|
var renderRightIn = (0, _react.useCallback)(function() {
|
|
217
227
|
if (!rightIn) return null;
|
|
@@ -238,13 +248,17 @@ var SearchBar = function SearchBar(props) {
|
|
|
238
248
|
visibility: "".concat(!innerTag && value && clearable ? 'visible' : 'hidden')
|
|
239
249
|
},
|
|
240
250
|
onClick: clearaVal,
|
|
241
|
-
|
|
242
|
-
|
|
251
|
+
ariaRole: "button",
|
|
252
|
+
ariaLabel: locale.clear
|
|
253
|
+
}, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.MaskClose, {
|
|
254
|
+
ariaHidden: true
|
|
255
|
+
}));
|
|
243
256
|
}, [
|
|
244
257
|
value,
|
|
245
258
|
clearable,
|
|
246
259
|
clearaVal,
|
|
247
|
-
innerTag
|
|
260
|
+
innerTag,
|
|
261
|
+
locale
|
|
248
262
|
]);
|
|
249
263
|
var onConfirm = function onConfirm() {
|
|
250
264
|
onSearch && onSearch(value);
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwipeRef, TaroSwipeProps } from "../../types";
|
|
3
|
-
export declare const Swipe: React.ForwardRefExoticComponent<Partial<TaroSwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "
|
|
3
|
+
export declare const Swipe: React.ForwardRefExoticComponent<Partial<TaroSwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchStart" | "onTouchMove" | "onTouchEnd"> & React.RefAttributes<SwipeRef>>;
|
|
@@ -63,6 +63,7 @@ var Tabs = function Tabs(props) {
|
|
|
63
63
|
onChange: onChange
|
|
64
64
|
}), 2), value = _usePropsValue[0], setValue = _usePropsValue[1];
|
|
65
65
|
var titleItemsRef = (0, _react.useRef)([]);
|
|
66
|
+
var tabsRef = (0, _react.useRef)(null);
|
|
66
67
|
var getTitles = function getTitles() {
|
|
67
68
|
var titles = [];
|
|
68
69
|
_react.default.Children.forEach(children, function(child, idx) {
|
|
@@ -102,7 +103,8 @@ var Tabs = function Tabs(props) {
|
|
|
102
103
|
var classesTitle = (0, _classnames.default)("".concat(classPrefix, "-titles"), (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-titles-").concat(activeType), activeType), (0, _define_property._)(_obj, "".concat(classPrefix, "-titles-").concat(align), align), _obj));
|
|
103
104
|
var getRect = function getRect(selector) {
|
|
104
105
|
return new Promise(function(resolve) {
|
|
105
|
-
|
|
106
|
+
var _tabsRef_current;
|
|
107
|
+
(0, _taro.createSelectorQuery)().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).select(selector).boundingClientRect().exec(function() {
|
|
106
108
|
var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
107
109
|
resolve(rect[0]);
|
|
108
110
|
});
|
|
@@ -110,7 +112,8 @@ var Tabs = function Tabs(props) {
|
|
|
110
112
|
};
|
|
111
113
|
var getAllRect = function getAllRect(selector) {
|
|
112
114
|
return new Promise(function(resolve) {
|
|
113
|
-
|
|
115
|
+
var _tabsRef_current;
|
|
116
|
+
(0, _taro.createSelectorQuery)().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).selectAll(selector).boundingClientRect().exec(function() {
|
|
114
117
|
var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
115
118
|
resolve(rect[0]);
|
|
116
119
|
});
|
|
@@ -190,9 +193,11 @@ var Tabs = function Tabs(props) {
|
|
|
190
193
|
setValue(item.value);
|
|
191
194
|
}
|
|
192
195
|
};
|
|
193
|
-
return /*#__PURE__*/ _react.default.createElement(_components.View, (0, _object_spread._)({
|
|
196
|
+
return /*#__PURE__*/ _react.default.createElement(_components.View, (0, _object_spread_props._)((0, _object_spread._)({
|
|
194
197
|
className: classes
|
|
195
|
-
}, rest),
|
|
198
|
+
}, rest), {
|
|
199
|
+
ref: tabsRef
|
|
200
|
+
}), /*#__PURE__*/ _react.default.createElement(_components.ScrollView, {
|
|
196
201
|
enableFlex: true,
|
|
197
202
|
scrollX: direction === 'horizontal',
|
|
198
203
|
scrollY: direction === 'vertical',
|
|
@@ -224,7 +229,9 @@ var Tabs = function Tabs(props) {
|
|
|
224
229
|
background: activeColor
|
|
225
230
|
}
|
|
226
231
|
}), activeType === 'smile' && /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
227
|
-
className: "".concat(classPrefix, "-titles-item-smile")
|
|
232
|
+
className: "".concat(classPrefix, "-titles-item-smile"),
|
|
233
|
+
// @ts-ignore
|
|
234
|
+
ariaHidden: true
|
|
228
235
|
}, /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.JoySmile, {
|
|
229
236
|
color: activeColor
|
|
230
237
|
})), /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BaseProps } from '../../base/props';
|
|
3
4
|
import { UIFill, UIRound, UISize, UIType } from '../../base/atoms';
|
|
4
5
|
export interface BaseButton extends BaseProps {
|
|
@@ -14,5 +15,5 @@ export interface BaseButton extends BaseProps {
|
|
|
14
15
|
rightIcon: ReactNode;
|
|
15
16
|
id: string;
|
|
16
17
|
nativeType: 'submit' | 'reset' | 'button';
|
|
17
|
-
onClick: (e:
|
|
18
|
+
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
18
19
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { ButtonProps as MiniProgramButtonProps } from '@tarojs/components';
|
|
1
2
|
import { BaseButton } from './base';
|
|
2
|
-
|
|
3
|
+
type OmitMiniProgramButtonProps = Omit<MiniProgramButtonProps, 'size' | 'type' | 'onClick' | 'style' | 'disabled' | 'loading' | 'id'>;
|
|
4
|
+
export interface TaroButtonProps extends BaseButton, OmitMiniProgramButtonProps {
|
|
5
|
+
nativeType: 'submit' | 'reset';
|
|
3
6
|
}
|
|
7
|
+
export {};
|
|
@@ -20,6 +20,7 @@ export interface BaseQuickEnter<POPUP_PROPS = any> extends BaseProps {
|
|
|
20
20
|
popupProps?: POPUP_PROPS;
|
|
21
21
|
closeOnOverlayClick?: boolean;
|
|
22
22
|
closeIcon?: ReactNode;
|
|
23
|
+
safeAreaInsetTop?: boolean;
|
|
23
24
|
onClose?: () => void;
|
|
24
25
|
onChange?: (item: QuickEnterOption, index: number) => void;
|
|
25
26
|
children?: ReactNode;
|