@nutui/nutui-react-taro 3.0.5 → 3.0.7
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 +59 -1
- package/dist/cjs/packages/actionsheet/style/style.css +4 -4
- package/dist/cjs/packages/address/style/style.css +4 -4
- package/dist/cjs/packages/audio/style/style.css +4 -16
- package/dist/cjs/packages/badge/badge.js +4 -3
- package/dist/cjs/packages/badge/style/badge.scss +4 -0
- package/dist/cjs/packages/badge/style/style.css +9 -6
- package/dist/cjs/packages/badge/style/style.harmony.css +3 -0
- package/dist/cjs/packages/button/style/button.scss +4 -20
- package/dist/cjs/packages/button/style/style.css +4 -16
- package/dist/cjs/packages/button/style/style.harmony.css +2 -14
- package/dist/cjs/packages/calendar/style/style.css +4 -4
- package/dist/cjs/packages/cascader/style/style.css +4 -4
- package/dist/cjs/packages/collapse/style/style.css +22 -7
- package/dist/cjs/packages/collapseitem/collapseitem.js +63 -77
- package/dist/cjs/packages/collapseitem/style/collapseitem.scss +22 -5
- package/dist/cjs/packages/collapseitem/style/style.css +22 -7
- package/dist/cjs/packages/collapseitem/style/style.harmony.css +22 -7
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/datepicker/style/style.css +7 -4
- package/dist/cjs/packages/datepickerview/style/style.css +3 -0
- package/dist/cjs/packages/dialog/content.d.ts +11 -3
- package/dist/cjs/packages/dialog/content.js +4 -4
- package/dist/cjs/packages/dialog/dialog.d.ts +39 -4
- package/dist/cjs/packages/dialog/dialog.js +14 -13
- package/dist/cjs/packages/dialog/index.d.ts +1 -1
- package/dist/cjs/packages/dialog/style/style.css +4 -16
- package/dist/cjs/packages/empty/style/style.css +4 -16
- package/dist/cjs/packages/fixednav/style/style.css +9 -6
- package/dist/cjs/packages/imagepreview/style/style.css +4 -4
- package/dist/cjs/packages/indicator/indicator.js +1 -1
- package/dist/cjs/packages/lottie/index.js +5 -5
- package/dist/cjs/packages/lottie/{mp.js → lottiemp.js} +1 -1
- package/dist/cjs/packages/notify/notify.js +44 -13
- package/dist/cjs/packages/notify/style/notify.scss +39 -36
- package/dist/cjs/packages/notify/style/style.css +36 -31
- package/dist/cjs/packages/notify/style/style.harmony.css +36 -31
- package/dist/cjs/packages/numberkeyboard/style/style.css +4 -4
- package/dist/cjs/packages/picker/style/style.css +7 -4
- package/dist/cjs/packages/pickerview/pickerroller.js +7 -2
- package/dist/cjs/packages/pickerview/style/pickerview.scss +3 -0
- package/dist/cjs/packages/pickerview/style/style.css +3 -0
- package/dist/cjs/packages/pickerview/style/style.harmony.css +3 -0
- package/dist/cjs/packages/popover/popover.d.ts +0 -7
- package/dist/cjs/packages/popover/popover.js +114 -141
- package/dist/cjs/packages/popover/style/popover.scss +48 -51
- package/dist/cjs/packages/popover/style/style.css +64 -70
- package/dist/cjs/packages/popover/style/style.harmony.css +64 -60
- package/dist/cjs/packages/popup/style/popup.scss +4 -4
- package/dist/cjs/packages/popup/style/style.css +4 -4
- package/dist/cjs/packages/popup/style/style.harmony.css +4 -4
- package/dist/cjs/packages/resultpage/style/style.css +4 -16
- package/dist/cjs/packages/searchbar/searchbar.js +8 -2
- package/dist/cjs/packages/shortpassword/style/style.css +4 -4
- package/dist/cjs/packages/skeleton/skeleton.js +63 -52
- package/dist/cjs/packages/skeleton/style/index.js +0 -1
- package/dist/cjs/packages/skeleton/style/skeleton.scss +40 -46
- package/dist/cjs/packages/skeleton/style/style.css +32 -175
- package/dist/cjs/packages/skeleton/style/style.harmony.css +32 -42
- package/dist/cjs/packages/switch/style/style.css +5 -0
- package/dist/cjs/packages/switch/style/style.harmony.css +5 -0
- package/dist/cjs/packages/switch/style/switch.scss +5 -0
- package/dist/cjs/packages/switch/switch.js +22 -11
- package/dist/cjs/packages/tabbar/style/style.css +54 -45
- package/dist/cjs/packages/tabbar/style/style.harmony.css +24 -18
- package/dist/cjs/packages/tabbar/style/tabbar.scss +28 -19
- package/dist/cjs/packages/tabbar/tabbar.js +28 -10
- package/dist/cjs/packages/tabbaritem/style/style.css +30 -27
- package/dist/cjs/packages/tabbaritem/style/style.harmony.css +21 -21
- package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +32 -29
- package/dist/cjs/packages/tabbaritem/tabbaritem.js +38 -14
- package/dist/cjs/packages/tabpane/tabpane.js +2 -2
- package/dist/cjs/packages/timeselect/style/style.css +4 -4
- package/dist/cjs/packages/tour/style/style.css +64 -70
- package/dist/cjs/packages/tour/tour.js +3 -4
- package/dist/cjs/types/spec/badge/base.d.ts +1 -0
- package/dist/cjs/types/spec/dialog/base.d.ts +50 -1
- package/dist/cjs/types/spec/dialog/base.js +7 -0
- package/dist/cjs/types/spec/dialog/h5.d.ts +4 -1
- package/dist/cjs/types/spec/dialog/taro.d.ts +8 -2
- package/dist/cjs/types/spec/indicator/base.d.ts +1 -1
- package/dist/cjs/types/spec/notify/base.d.ts +7 -2
- package/dist/cjs/types/spec/popover/base.d.ts +7 -0
- package/dist/cjs/types/spec/searchbar/taro.d.ts +10 -7
- package/dist/cjs/types/spec/skeleton/base.d.ts +7 -5
- package/dist/cjs/types/spec/switch/base.d.ts +3 -2
- package/dist/cjs/types/spec/switch/h5.d.ts +1 -1
- package/dist/cjs/types/spec/switch/taro.d.ts +1 -4
- package/dist/cjs/types/spec/tabbar/base.d.ts +7 -4
- package/dist/cjs/utils/get-rect-by-taro.js +10 -0
- package/dist/cjs/utils/lru.d.ts +8 -0
- package/dist/cjs/utils/lru.js +58 -0
- package/dist/es/packages/actionsheet/style/style.css +4 -4
- package/dist/es/packages/address/style/style.css +4 -4
- package/dist/es/packages/audio/style/style.css +4 -16
- package/dist/es/packages/badge/badge.js +4 -3
- package/dist/es/packages/badge/style/badge.scss +4 -0
- package/dist/es/packages/badge/style/style.css +9 -6
- package/dist/es/packages/badge/style/style.harmony.css +3 -0
- package/dist/es/packages/button/style/button.scss +4 -20
- package/dist/es/packages/button/style/style.css +4 -16
- package/dist/es/packages/button/style/style.harmony.css +2 -14
- package/dist/es/packages/calendar/style/style.css +4 -4
- package/dist/es/packages/cascader/style/style.css +4 -4
- package/dist/es/packages/collapse/style/style.css +22 -7
- package/dist/es/packages/collapseitem/collapseitem.js +65 -79
- package/dist/es/packages/collapseitem/style/collapseitem.scss +22 -5
- package/dist/es/packages/collapseitem/style/style.css +22 -7
- package/dist/es/packages/collapseitem/style/style.harmony.css +22 -7
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/datepicker/style/style.css +7 -4
- package/dist/es/packages/datepickerview/style/style.css +3 -0
- package/dist/es/packages/dialog/content.d.ts +11 -3
- package/dist/es/packages/dialog/content.js +4 -4
- package/dist/es/packages/dialog/dialog.d.ts +39 -4
- package/dist/es/packages/dialog/dialog.js +14 -13
- package/dist/es/packages/dialog/index.d.ts +1 -1
- package/dist/es/packages/dialog/style/style.css +4 -16
- package/dist/es/packages/empty/style/style.css +4 -16
- package/dist/es/packages/fixednav/style/style.css +9 -6
- package/dist/es/packages/imagepreview/style/style.css +4 -4
- package/dist/es/packages/indicator/indicator.js +1 -1
- package/dist/es/packages/lottie/index.js +3 -3
- package/dist/es/packages/lottie/{mp.js → lottiemp.js} +1 -1
- package/dist/es/packages/notify/notify.js +45 -14
- package/dist/es/packages/notify/style/notify.scss +39 -36
- package/dist/es/packages/notify/style/style.css +36 -31
- package/dist/es/packages/notify/style/style.harmony.css +36 -31
- package/dist/es/packages/numberkeyboard/style/style.css +4 -4
- package/dist/es/packages/picker/style/style.css +7 -4
- package/dist/es/packages/pickerview/pickerroller.js +7 -2
- package/dist/es/packages/pickerview/style/pickerview.scss +3 -0
- package/dist/es/packages/pickerview/style/style.css +3 -0
- package/dist/es/packages/pickerview/style/style.harmony.css +3 -0
- package/dist/es/packages/popover/popover.d.ts +0 -7
- package/dist/es/packages/popover/popover.js +115 -142
- package/dist/es/packages/popover/style/popover.scss +48 -51
- package/dist/es/packages/popover/style/style.css +64 -70
- package/dist/es/packages/popover/style/style.harmony.css +64 -60
- package/dist/es/packages/popup/style/popup.scss +4 -4
- package/dist/es/packages/popup/style/style.css +4 -4
- package/dist/es/packages/popup/style/style.harmony.css +4 -4
- package/dist/es/packages/resultpage/style/style.css +4 -16
- package/dist/es/packages/searchbar/searchbar.js +7 -2
- package/dist/es/packages/shortpassword/style/style.css +4 -4
- package/dist/es/packages/skeleton/skeleton.js +62 -52
- package/dist/es/packages/skeleton/style/index.js +0 -1
- package/dist/es/packages/skeleton/style/skeleton.scss +40 -46
- package/dist/es/packages/skeleton/style/style.css +32 -175
- package/dist/es/packages/skeleton/style/style.harmony.css +32 -42
- package/dist/es/packages/switch/style/style.css +5 -0
- package/dist/es/packages/switch/style/style.harmony.css +5 -0
- package/dist/es/packages/switch/style/switch.scss +5 -0
- package/dist/es/packages/switch/switch.js +21 -11
- package/dist/es/packages/tabbar/style/style.css +54 -45
- package/dist/es/packages/tabbar/style/style.harmony.css +24 -18
- package/dist/es/packages/tabbar/style/tabbar.scss +28 -19
- package/dist/es/packages/tabbar/tabbar.js +27 -10
- package/dist/es/packages/tabbaritem/style/style.css +30 -27
- package/dist/es/packages/tabbaritem/style/style.harmony.css +21 -21
- package/dist/es/packages/tabbaritem/style/tabbaritem.scss +32 -29
- package/dist/es/packages/tabbaritem/tabbaritem.js +38 -14
- package/dist/es/packages/tabpane/tabpane.js +2 -2
- package/dist/es/packages/timeselect/style/style.css +4 -4
- package/dist/es/packages/tour/style/style.css +64 -70
- package/dist/es/packages/tour/tour.js +3 -4
- package/dist/es/types/spec/badge/base.d.ts +4 -0
- package/dist/es/types/spec/dialog/base.d.ts +83 -1
- package/dist/es/types/spec/dialog/base.js +1 -1
- package/dist/es/types/spec/dialog/h5.d.ts +4 -1
- package/dist/es/types/spec/dialog/taro.d.ts +8 -2
- package/dist/es/types/spec/indicator/base.d.ts +1 -1
- package/dist/es/types/spec/notify/base.d.ts +22 -5
- package/dist/es/types/spec/popover/base.d.ts +7 -0
- package/dist/es/types/spec/searchbar/taro.d.ts +10 -7
- package/dist/es/types/spec/skeleton/base.d.ts +19 -14
- package/dist/es/types/spec/switch/base.d.ts +6 -2
- package/dist/es/types/spec/switch/h5.d.ts +1 -1
- package/dist/es/types/spec/switch/taro.d.ts +1 -4
- package/dist/es/types/spec/tabbar/base.d.ts +7 -4
- package/dist/es/utils/get-rect-by-taro.js +9 -0
- package/dist/es/utils/lru.d.ts +8 -0
- package/dist/es/utils/lru.js +49 -0
- package/dist/nutui.react.umd.js +683 -552
- package/dist/style.css +1 -1
- package/dist/style.scss +46 -46
- package/dist/styles/theme-jmapp.scss +1 -0
- package/dist/styles/themes/jmapp.css +1 -1
- package/dist/styles/variables-jmapp.scss +237 -50
- package/dist/styles/variables-jrkf.scss +25 -14
- package/dist/styles/variables.scss +38 -51
- package/package.json +1 -1
- package/dist/cjs/packages/dialog/types.d.ts +0 -57
- package/dist/cjs/packages/dialog/types.js +0 -4
- package/dist/cjs/packages/dialog/types.taro.d.ts +0 -10
- package/dist/es/packages/dialog/types.d.ts +0 -57
- package/dist/es/packages/dialog/types.js +0 -1
- package/dist/es/packages/dialog/types.taro.d.ts +0 -10
- /package/dist/cjs/packages/lottie/{mp.d.ts → lottiemp.d.ts} +0 -0
- /package/dist/cjs/packages/lottie/{web.d.ts → lottieweb.d.ts} +0 -0
- /package/dist/cjs/packages/lottie/{web.js → lottieweb.js} +0 -0
- /package/dist/es/packages/lottie/{mp.d.ts → lottiemp.d.ts} +0 -0
- /package/dist/es/packages/lottie/{web.d.ts → lottieweb.d.ts} +0 -0
- /package/dist/es/packages/lottie/{web.js → lottieweb.js} +0 -0
|
@@ -1,7 +1,42 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const defaultProps:
|
|
4
|
-
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { TaroDialogProps } from "../../types";
|
|
3
|
+
declare const defaultProps: {
|
|
4
|
+
title: string;
|
|
5
|
+
content: string;
|
|
6
|
+
header: string;
|
|
7
|
+
footer: string;
|
|
8
|
+
confirmText: string;
|
|
9
|
+
cancelText: string;
|
|
10
|
+
hideConfirmButton: boolean;
|
|
11
|
+
hideCancelButton: boolean;
|
|
12
|
+
disableConfirmButton: boolean;
|
|
13
|
+
footerDirection: string;
|
|
14
|
+
closeIconPosition: string;
|
|
15
|
+
closeIcon: boolean;
|
|
16
|
+
overlay: boolean;
|
|
17
|
+
overlayStyle: {};
|
|
18
|
+
overlayClassName: string;
|
|
19
|
+
zIndex: number;
|
|
20
|
+
beforeCancel: () => boolean;
|
|
21
|
+
beforeClose: () => boolean;
|
|
22
|
+
onCancel: () => void;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
onConfirm: () => void;
|
|
25
|
+
onOverlayClick: () => boolean;
|
|
26
|
+
visible: boolean;
|
|
27
|
+
close: string;
|
|
28
|
+
onClick: () => void;
|
|
29
|
+
className?: string | undefined;
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
style?: React.CSSProperties | undefined;
|
|
33
|
+
duration: number;
|
|
34
|
+
closeOnOverlayClick: boolean;
|
|
35
|
+
lockScroll: boolean;
|
|
36
|
+
afterShow: () => void;
|
|
37
|
+
afterClose: () => void;
|
|
38
|
+
};
|
|
39
|
+
export declare const BaseDialog: FunctionComponent<Partial<TaroDialogProps>> & {
|
|
5
40
|
open: typeof open;
|
|
6
41
|
close: typeof close;
|
|
7
42
|
};
|
|
@@ -36,10 +36,10 @@ var _index = /*#__PURE__*/ _interop_require_default._(require("../button/index")
|
|
|
36
36
|
var _content = require("./content");
|
|
37
37
|
var _configprovider = require("../configprovider/configprovider");
|
|
38
38
|
var _index1 = /*#__PURE__*/ _interop_require_default._(require("../overlay/index"));
|
|
39
|
+
var _overlay = require("../overlay/overlay");
|
|
39
40
|
var _usecustomevent = require("../../hooks/use-custom-event");
|
|
40
41
|
var _uselockscolltaro = require("../../hooks/use-lock-scoll-taro");
|
|
41
42
|
var _mergeprops = require("../../utils/merge-props");
|
|
42
|
-
var _overlay = require("../overlay/overlay");
|
|
43
43
|
var _platformtaro = require("../../utils/platform-taro");
|
|
44
44
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _overlay.defaultOverlayProps, _content.defaultContentProps), {
|
|
45
45
|
title: '',
|
|
@@ -48,15 +48,15 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _overla
|
|
|
48
48
|
footer: '',
|
|
49
49
|
confirmText: '',
|
|
50
50
|
cancelText: '',
|
|
51
|
-
overlay: true,
|
|
52
|
-
overlayStyle: {},
|
|
53
|
-
overlayClassName: 'nut-dialog-overlay',
|
|
54
51
|
hideConfirmButton: false,
|
|
55
52
|
hideCancelButton: false,
|
|
56
53
|
disableConfirmButton: false,
|
|
57
54
|
footerDirection: 'horizontal',
|
|
58
55
|
closeIconPosition: 'bottom',
|
|
59
56
|
closeIcon: false,
|
|
57
|
+
overlay: true,
|
|
58
|
+
overlayStyle: {},
|
|
59
|
+
overlayClassName: 'nut-dialog-overlay',
|
|
60
60
|
zIndex: 1200,
|
|
61
61
|
beforeCancel: function beforeCancel() {
|
|
62
62
|
return true;
|
|
@@ -66,15 +66,16 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _overla
|
|
|
66
66
|
},
|
|
67
67
|
onCancel: function onCancel() {},
|
|
68
68
|
onClose: function onClose() {},
|
|
69
|
+
onConfirm: function onConfirm() {},
|
|
69
70
|
onOverlayClick: function onOverlayClick() {
|
|
70
71
|
return true;
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
var BaseDialog = function BaseDialog(props) {
|
|
75
|
+
var _useParams = (0, _usecustomevent.useParams)((0, _mergeprops.mergeProps)(defaultProps, props)), _useParams_params = _useParams.params, id = _useParams_params.id, closeOnOverlayClick = _useParams_params.closeOnOverlayClick, confirmText = _useParams_params.confirmText, cancelText = _useParams_params.cancelText, children = _useParams_params.children, className = _useParams_params.className, closeIconPosition = _useParams_params.closeIconPosition, closeIcon = _useParams_params.closeIcon, content = _useParams_params.content, disableConfirmButton = _useParams_params.disableConfirmButton, footer = _useParams_params.footer, footerDirection = _useParams_params.footerDirection, header = _useParams_params.header, hideConfirmButton = _useParams_params.hideConfirmButton, hideCancelButton = _useParams_params.hideCancelButton, lockScroll = _useParams_params.lockScroll, overlay = _useParams_params.overlay, overlayStyle = _useParams_params.overlayStyle, overlayClassName = _useParams_params.overlayClassName, style = _useParams_params.style, title = _useParams_params.title, visible = _useParams_params.visible, zIndex = _useParams_params.zIndex, beforeCancel = _useParams_params.beforeCancel, beforeClose = _useParams_params.beforeClose, onClose = _useParams_params.onClose, onCancel = _useParams_params.onCancel, onConfirm = _useParams_params.onConfirm, onOverlayClick = _useParams_params.onOverlayClick, setParams = _useParams.setParams;
|
|
74
76
|
var classPrefix = 'nut-dialog';
|
|
75
77
|
var locale = (0, _configprovider.useConfig)().locale;
|
|
76
78
|
var _useState = (0, _sliced_to_array._)((0, _react.useState)(false), 2), loading = _useState[0], setLoading = _useState[1];
|
|
77
|
-
var _useParams = (0, _usecustomevent.useParams)((0, _mergeprops.mergeProps)(defaultProps, props)), _useParams_params = _useParams.params, id = _useParams_params.id, className = _useParams_params.className, style = _useParams_params.style, visible = _useParams_params.visible, footer = _useParams_params.footer, title = _useParams_params.title, header = _useParams_params.header, content = _useParams_params.content, children = _useParams_params.children, footerDirection = _useParams_params.footerDirection, hideConfirmButton = _useParams_params.hideConfirmButton, hideCancelButton = _useParams_params.hideCancelButton, lockScroll = _useParams_params.lockScroll, disableConfirmButton = _useParams_params.disableConfirmButton, closeOnOverlayClick = _useParams_params.closeOnOverlayClick, confirmText = _useParams_params.confirmText, cancelText = _useParams_params.cancelText, overlay = _useParams_params.overlay, overlayStyle = _useParams_params.overlayStyle, overlayClassName = _useParams_params.overlayClassName, closeIconPosition = _useParams_params.closeIconPosition, closeIcon = _useParams_params.closeIcon, zIndex = _useParams_params.zIndex, beforeCancel = _useParams_params.beforeCancel, beforeClose = _useParams_params.beforeClose, onClose = _useParams_params.onClose, onCancel = _useParams_params.onCancel, onConfirm = _useParams_params.onConfirm, onOverlayClick = _useParams_params.onOverlayClick, setParams = _useParams.setParams;
|
|
78
79
|
(0, _usecustomevent.useCustomEvent)(id, function(param) {
|
|
79
80
|
var status = param.status, options = param.options;
|
|
80
81
|
setParams((0, _object_spread_props._)((0, _object_spread._)({}, options), {
|
|
@@ -88,8 +89,8 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
88
89
|
e.stopPropagation();
|
|
89
90
|
if (!(beforeCancel === null || beforeCancel === void 0 ? void 0 : beforeCancel())) return;
|
|
90
91
|
if (!(beforeClose === null || beforeClose === void 0 ? void 0 : beforeClose())) return;
|
|
91
|
-
onClose
|
|
92
|
-
onCancel
|
|
92
|
+
onClose();
|
|
93
|
+
onCancel();
|
|
93
94
|
};
|
|
94
95
|
var handleOk = /*#__PURE__*/ function() {
|
|
95
96
|
var _ref = (0, _async_to_generator._)(function(e) {
|
|
@@ -114,7 +115,7 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
114
115
|
case 2:
|
|
115
116
|
_state.sent();
|
|
116
117
|
setLoading(false);
|
|
117
|
-
onClose
|
|
118
|
+
onClose();
|
|
118
119
|
return [
|
|
119
120
|
3,
|
|
120
121
|
4
|
|
@@ -158,8 +159,8 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
158
159
|
};
|
|
159
160
|
var renderConfirm = function renderConfirm() {
|
|
160
161
|
return !hideConfirmButton && /*#__PURE__*/ _react.default.createElement(_index.default, {
|
|
161
|
-
size: "large",
|
|
162
162
|
type: "primary",
|
|
163
|
+
size: "large",
|
|
163
164
|
className: (0, _classnames.default)("".concat(classPrefix, "-footer-ok ").concat(btnClass), {
|
|
164
165
|
disabled: disableConfirmButton
|
|
165
166
|
}),
|
|
@@ -177,8 +178,8 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
177
178
|
var handleCancel = function handleCancel() {
|
|
178
179
|
if (!(beforeCancel === null || beforeCancel === void 0 ? void 0 : beforeCancel())) return;
|
|
179
180
|
if (!(beforeClose === null || beforeClose === void 0 ? void 0 : beforeClose())) return;
|
|
180
|
-
onClose
|
|
181
|
-
onCancel
|
|
181
|
+
onClose();
|
|
182
|
+
onCancel();
|
|
182
183
|
};
|
|
183
184
|
var _obj;
|
|
184
185
|
var closeClasses = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-close"), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-close-").concat(closeIconPosition), true), _obj));
|
|
@@ -191,8 +192,8 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
191
192
|
var onHandleClickOverlay = function onHandleClickOverlay(e) {
|
|
192
193
|
if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
|
|
193
194
|
var closed = onOverlayClick && onOverlayClick(e);
|
|
194
|
-
closed && onClose
|
|
195
|
-
closed && onCancel
|
|
195
|
+
closed && onClose();
|
|
196
|
+
closed && onCancel();
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
199
|
var renderContent = function renderContent() {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BaseDialog } from "./dialog";
|
|
2
|
-
export type { DialogConfigType, DialogCloseIconPosition, DialogFooterDirection, ContentProps, DialogWrapProps,
|
|
2
|
+
export type { DialogConfigType, DialogCloseIconPosition, DialogFooterDirection, TaroContentProps as ContentProps, DialogWrapProps, TaroDialogProps as DialogProps, DialogReturnProps, } from "../../types";
|
|
3
3
|
export default BaseDialog;
|
|
@@ -94,18 +94,6 @@
|
|
|
94
94
|
.nut-button-round {
|
|
95
95
|
border-radius: var(--nutui-button-border-radius, var(--nutui-radius-s, 6px));
|
|
96
96
|
}
|
|
97
|
-
.nut-button-round-xlarge {
|
|
98
|
-
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base, 8px));
|
|
99
|
-
}
|
|
100
|
-
.nut-button-round-large {
|
|
101
|
-
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-base, 8px));
|
|
102
|
-
}
|
|
103
|
-
.nut-button-round-small {
|
|
104
|
-
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-s, 6px));
|
|
105
|
-
}
|
|
106
|
-
.nut-button-round-mini {
|
|
107
|
-
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs, 4px));
|
|
108
|
-
}
|
|
109
97
|
.nut-button-default {
|
|
110
98
|
padding: var(--nutui-button-default-padding, 0px 12px);
|
|
111
99
|
border-style: solid;
|
|
@@ -131,7 +119,7 @@
|
|
|
131
119
|
height: var(--nutui-button-xlarge-height, 48px);
|
|
132
120
|
padding: var(--nutui-button-xlarge-padding, 0px 24px);
|
|
133
121
|
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
134
|
-
border-radius: var(--nutui-radius-base, 8px);
|
|
122
|
+
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base, 8px));
|
|
135
123
|
}
|
|
136
124
|
.nut-button-xlarge .nut-button-text {
|
|
137
125
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -151,7 +139,7 @@
|
|
|
151
139
|
height: var(--nutui-button-large-height, 40px);
|
|
152
140
|
padding: var(--nutui-button-large-padding, 0px 16px);
|
|
153
141
|
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
|
|
154
|
-
border-radius: var(--nutui-radius-
|
|
142
|
+
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-base, 8px));
|
|
155
143
|
}
|
|
156
144
|
.nut-button-large .nut-button-text {
|
|
157
145
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -171,7 +159,7 @@
|
|
|
171
159
|
height: var(--nutui-button-small-height, 28px);
|
|
172
160
|
padding: var(--nutui-button-small-padding, 0px 8px);
|
|
173
161
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
|
|
174
|
-
border-radius: var(--nutui-radius-
|
|
162
|
+
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-s, 6px));
|
|
175
163
|
}
|
|
176
164
|
.nut-button-small .nut-icon {
|
|
177
165
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
|
|
@@ -185,7 +173,7 @@
|
|
|
185
173
|
height: var(--nutui-button-mini-height, 24px);
|
|
186
174
|
padding: var(--nutui-button-mini-padding, 0px 8px);
|
|
187
175
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
188
|
-
border-radius: var(--nutui-radius-xs, 4px);
|
|
176
|
+
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs, 4px));
|
|
189
177
|
}
|
|
190
178
|
.nut-button-mini .nut-icon {
|
|
191
179
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
@@ -94,18 +94,6 @@
|
|
|
94
94
|
.nut-button-round {
|
|
95
95
|
border-radius: var(--nutui-button-border-radius, var(--nutui-radius-s, 6px));
|
|
96
96
|
}
|
|
97
|
-
.nut-button-round-xlarge {
|
|
98
|
-
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base, 8px));
|
|
99
|
-
}
|
|
100
|
-
.nut-button-round-large {
|
|
101
|
-
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-base, 8px));
|
|
102
|
-
}
|
|
103
|
-
.nut-button-round-small {
|
|
104
|
-
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-s, 6px));
|
|
105
|
-
}
|
|
106
|
-
.nut-button-round-mini {
|
|
107
|
-
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs, 4px));
|
|
108
|
-
}
|
|
109
97
|
.nut-button-default {
|
|
110
98
|
padding: var(--nutui-button-default-padding, 0px 12px);
|
|
111
99
|
border-style: solid;
|
|
@@ -131,7 +119,7 @@
|
|
|
131
119
|
height: var(--nutui-button-xlarge-height, 48px);
|
|
132
120
|
padding: var(--nutui-button-xlarge-padding, 0px 24px);
|
|
133
121
|
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
134
|
-
border-radius: var(--nutui-radius-base, 8px);
|
|
122
|
+
border-radius: var(--nutui-button-xlarge-border-radius, var(--nutui-radius-base, 8px));
|
|
135
123
|
}
|
|
136
124
|
.nut-button-xlarge .nut-button-text {
|
|
137
125
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -151,7 +139,7 @@
|
|
|
151
139
|
height: var(--nutui-button-large-height, 40px);
|
|
152
140
|
padding: var(--nutui-button-large-padding, 0px 16px);
|
|
153
141
|
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
|
|
154
|
-
border-radius: var(--nutui-radius-
|
|
142
|
+
border-radius: var(--nutui-button-large-border-radius, var(--nutui-radius-base, 8px));
|
|
155
143
|
}
|
|
156
144
|
.nut-button-large .nut-button-text {
|
|
157
145
|
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
@@ -171,7 +159,7 @@
|
|
|
171
159
|
height: var(--nutui-button-small-height, 28px);
|
|
172
160
|
padding: var(--nutui-button-small-padding, 0px 8px);
|
|
173
161
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
|
|
174
|
-
border-radius: var(--nutui-radius-
|
|
162
|
+
border-radius: var(--nutui-button-small-border-radius, var(--nutui-radius-s, 6px));
|
|
175
163
|
}
|
|
176
164
|
.nut-button-small .nut-icon {
|
|
177
165
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
|
|
@@ -185,7 +173,7 @@
|
|
|
185
173
|
height: var(--nutui-button-mini-height, 24px);
|
|
186
174
|
padding: var(--nutui-button-mini-padding, 0px 8px);
|
|
187
175
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
188
|
-
border-radius: var(--nutui-radius-xs, 4px);
|
|
176
|
+
border-radius: var(--nutui-button-mini-border-radius, var(--nutui-radius-xs, 4px));
|
|
189
177
|
}
|
|
190
178
|
.nut-button-mini .nut-icon {
|
|
191
179
|
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
@@ -107,6 +107,9 @@
|
|
|
107
107
|
background: var(--nutui-badge-background-color, var(--nutui-color-primary, #ff0f23));
|
|
108
108
|
z-index: 1;
|
|
109
109
|
}
|
|
110
|
+
.nut-badge-disabled {
|
|
111
|
+
background: var(--nutui-badge-background-disabled-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
112
|
+
}
|
|
110
113
|
.nut-badge-number {
|
|
111
114
|
font-family: "JD";
|
|
112
115
|
}
|
|
@@ -132,14 +135,14 @@
|
|
|
132
135
|
height: var(--nutui-badge-dot-width, 6px);
|
|
133
136
|
}
|
|
134
137
|
.nut-badge-dot-small {
|
|
135
|
-
min-width: var(--nutui-badge-dot-width, 4px);
|
|
136
|
-
width: var(--nutui-badge-dot-width, 4px);
|
|
137
|
-
height: var(--nutui-badge-dot-width, 4px);
|
|
138
|
+
min-width: var(--nutui-badge-dot-small-width, 4px);
|
|
139
|
+
width: var(--nutui-badge-dot-small-width, 4px);
|
|
140
|
+
height: var(--nutui-badge-dot-small-width, 4px);
|
|
138
141
|
}
|
|
139
142
|
.nut-badge-dot-large {
|
|
140
|
-
min-width: var(--nutui-badge-dot-width, 8px);
|
|
141
|
-
width: var(--nutui-badge-dot-width, 8px);
|
|
142
|
-
height: var(--nutui-badge-dot-width, 8px);
|
|
143
|
+
min-width: var(--nutui-badge-dot-large-width, 8px);
|
|
144
|
+
width: var(--nutui-badge-dot-large-width, 8px);
|
|
145
|
+
height: var(--nutui-badge-dot-large-width, 8px);
|
|
143
146
|
}
|
|
144
147
|
.nut-badge-outline {
|
|
145
148
|
background: #ffffff;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
.nut-popup {
|
|
62
62
|
position: fixed;
|
|
63
|
-
min-height:
|
|
63
|
+
min-height: 26%;
|
|
64
64
|
max-height: 100%;
|
|
65
65
|
background-color: var(--nutui-overlay-content-bg-color, var(--nutui-color-background-overlay, #ffffff));
|
|
66
66
|
-webkit-overflow-scrolling: touch;
|
|
@@ -198,12 +198,12 @@
|
|
|
198
198
|
transform: scale(0.8);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
.nut-popup-slide-
|
|
201
|
+
.nut-popup-slide-none-enter-active {
|
|
202
202
|
animation-fill-mode: both;
|
|
203
203
|
animation-name: popup-scale-fade-in;
|
|
204
204
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
205
205
|
}
|
|
206
|
-
.nut-popup-slide-
|
|
206
|
+
.nut-popup-slide-none-exit-active {
|
|
207
207
|
animation-fill-mode: both;
|
|
208
208
|
animation-name: popup-scale-fade-out;
|
|
209
209
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
animation-name: popup-slide-left-exit;
|
|
331
331
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
332
332
|
}
|
|
333
|
-
.nut-popup-slide-
|
|
333
|
+
.nut-popup-slide-none-exit-done.nut-popup, .nut-popup-slide-center-exit-done.nut-popup, .nut-popup-slide-left-exit-done.nut-popup, .nut-popup-slide-right-exit-done.nut-popup, .nut-popup-slide-top-exit-done.nut-popup, .nut-popup-slide-bottom-exit-done.nut-popup {
|
|
334
334
|
display: none;
|
|
335
335
|
}
|
|
336
336
|
.nut-popup .nut-overflow-hidden {
|
|
@@ -26,7 +26,7 @@ var defaultProps = {
|
|
|
26
26
|
var classPrefix = "nut-indicator";
|
|
27
27
|
var Indicator = function Indicator(props) {
|
|
28
28
|
var maybeFixedWidth = function maybeFixedWidth() {
|
|
29
|
-
if (
|
|
29
|
+
if (type === 'dualScreen' || type === 'slide') {
|
|
30
30
|
return "".concat(classPrefix, "-fixed-width");
|
|
31
31
|
}
|
|
32
32
|
return '';
|
|
@@ -8,15 +8,15 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _lottieweb = require("./lottieweb");
|
|
12
|
+
var _lottiemp = require("./lottiemp");
|
|
13
13
|
var implementation;
|
|
14
14
|
if (process.env.TARO_ENV === 'h5') {
|
|
15
15
|
// @ts-ignore
|
|
16
|
-
implementation =
|
|
17
|
-
} else if (process.env.TARO_ENV === 'weapp') {
|
|
16
|
+
implementation = _lottieweb.Lottie;
|
|
17
|
+
} else if (process.env.TARO_ENV === 'weapp' || process.env.TARO_ENV === 'jd') {
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
implementation =
|
|
19
|
+
implementation = _lottiemp.Lottie;
|
|
20
20
|
} else {
|
|
21
21
|
// throw new Error(`不支持的 TARO_ENV: ${process.env.TARO_ENV}`)
|
|
22
22
|
implementation = function implementation(props) {
|
|
@@ -12,7 +12,7 @@ var _interop_require_default = require("@swc/helpers/_/_interop_require_default"
|
|
|
12
12
|
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
14
|
var _taro = require("@tarojs/taro");
|
|
15
|
-
var _lottieminiprogram = /*#__PURE__*/ _interop_require_default._(require("lottie-miniprogram"));
|
|
15
|
+
var _lottieminiprogram = /*#__PURE__*/ _interop_require_default._(require("@nutui/lottie-miniprogram"));
|
|
16
16
|
var _getsysteminfo = require("../../utils/get-system-info");
|
|
17
17
|
var _useuuid = /*#__PURE__*/ _interop_require_default._(require("../../hooks/use-uuid"));
|
|
18
18
|
var Lottie = /*#__PURE__*/ _react.default.forwardRef(function(props, ref) {
|
|
@@ -29,27 +29,33 @@ var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
|
29
29
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
30
30
|
var _reacttransitiongroup = require("react-transition-group");
|
|
31
31
|
var _components = require("@tarojs/components");
|
|
32
|
+
var _iconsreacttaro = require("@nutui/icons-react-taro");
|
|
33
|
+
var _platformtaro = require("../../utils/platform-taro");
|
|
34
|
+
var _pxtransform = /*#__PURE__*/ _interop_require_default._(require("../../utils/px-transform"));
|
|
32
35
|
var _typings = require("../../utils/typings");
|
|
33
36
|
var _usecustomevent = require("../../hooks/use-custom-event");
|
|
34
37
|
var _mergeprops = require("../../utils/merge-props");
|
|
35
38
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
36
39
|
id: '',
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
distance: 8,
|
|
41
|
+
navHeight: 57,
|
|
39
42
|
position: 'top',
|
|
40
43
|
visible: false,
|
|
44
|
+
closeable: false,
|
|
45
|
+
leftIcon: null,
|
|
46
|
+
rightIcon: null,
|
|
47
|
+
duration: 3000,
|
|
41
48
|
onClose: function onClose() {},
|
|
42
49
|
onClick: function onClick() {}
|
|
43
50
|
});
|
|
44
51
|
var classPrefix = 'nut-notify';
|
|
45
52
|
var Notify = function Notify(props) {
|
|
46
|
-
var _mergeProps = (0, _mergeprops.mergeProps)(defaultProps, props), id = _mergeProps.id, children = _mergeProps.children,
|
|
53
|
+
var _mergeProps = (0, _mergeprops.mergeProps)(defaultProps, props), id = _mergeProps.id, style = _mergeProps.style, children = _mergeProps.children, distance = _mergeProps.distance, navHeight = _mergeProps.navHeight, closeable = _mergeProps.closeable, leftIcon = _mergeProps.leftIcon, rightIcon = _mergeProps.rightIcon, position = _mergeProps.position, visible = _mergeProps.visible, duration = _mergeProps.duration, className = _mergeProps.className, onClose = _mergeProps.onClose, onClick = _mergeProps.onClick;
|
|
47
54
|
(0, _usecustomevent.useCustomEvent)(id, function(status) {
|
|
48
55
|
status ? show() : hide();
|
|
49
56
|
});
|
|
50
57
|
var timer;
|
|
51
58
|
var _useState = (0, _sliced_to_array._)((0, _react.useState)(false), 2), showNotify = _useState[0], setShowNotify = _useState[1];
|
|
52
|
-
var cssRef = (0, _react.useRef)(null);
|
|
53
59
|
(0, _react.useEffect)(function() {
|
|
54
60
|
if (visible) {
|
|
55
61
|
show();
|
|
@@ -59,9 +65,6 @@ var Notify = function Notify(props) {
|
|
|
59
65
|
}, [
|
|
60
66
|
visible
|
|
61
67
|
]);
|
|
62
|
-
var clickHandle = function clickHandle() {
|
|
63
|
-
onClick();
|
|
64
|
-
};
|
|
65
68
|
var show = function show() {
|
|
66
69
|
setShowNotify(true);
|
|
67
70
|
clearTimer();
|
|
@@ -81,10 +84,29 @@ var Notify = function Notify(props) {
|
|
|
81
84
|
setShowNotify(false);
|
|
82
85
|
onClose();
|
|
83
86
|
};
|
|
87
|
+
var getDistance = (0, _react.useMemo)(function() {
|
|
88
|
+
if (position === 'top') {
|
|
89
|
+
return {
|
|
90
|
+
top: (0, _pxtransform.default)((0, _platformtaro.web)() ? Number(distance) + navHeight : Number(distance))
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
bottom: (0, _pxtransform.default)(Number(distance))
|
|
95
|
+
};
|
|
96
|
+
}, [
|
|
97
|
+
distance,
|
|
98
|
+
position
|
|
99
|
+
]);
|
|
84
100
|
var _obj;
|
|
85
|
-
var classes = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix
|
|
101
|
+
var classes = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix), true), (0, _define_property._)(_obj, "".concat(className), true), _obj));
|
|
102
|
+
var handleClick = function handleClick() {
|
|
103
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
104
|
+
};
|
|
105
|
+
var handleClickIcon = function handleClickIcon() {
|
|
106
|
+
hide();
|
|
107
|
+
};
|
|
108
|
+
var _obj1;
|
|
86
109
|
return /*#__PURE__*/ _react.default.createElement(_reacttransitiongroup.CSSTransition, {
|
|
87
|
-
nodeRef: cssRef,
|
|
88
110
|
in: showNotify,
|
|
89
111
|
timeout: 300,
|
|
90
112
|
classNames: "fade",
|
|
@@ -93,10 +115,19 @@ var Notify = function Notify(props) {
|
|
|
93
115
|
position: position,
|
|
94
116
|
id: id
|
|
95
117
|
}, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
96
|
-
className:
|
|
97
|
-
style: style,
|
|
98
|
-
onClick:
|
|
99
|
-
},
|
|
118
|
+
className: classes,
|
|
119
|
+
style: (0, _object_spread._)({}, style, getDistance),
|
|
120
|
+
onClick: handleClick
|
|
121
|
+
}, leftIcon ? /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
122
|
+
className: "".concat(classPrefix, "-left-icon")
|
|
123
|
+
}, leftIcon) : null, /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
124
|
+
className: (0, _classnames.default)((_obj1 = {}, (0, _define_property._)(_obj1, "".concat(classPrefix, "-content"), true), (0, _define_property._)(_obj1, "".concat(classPrefix, "-ellipsis"), closeable || rightIcon), (0, _define_property._)(_obj1, "".concat(classPrefix, "-layout-left"), leftIcon || rightIcon), _obj1))
|
|
125
|
+
}, children), rightIcon || closeable ? /*#__PURE__*/ _react.default.createElement(_components.View, {
|
|
126
|
+
className: "".concat(classPrefix, "-right-icon"),
|
|
127
|
+
onClick: handleClickIcon
|
|
128
|
+
}, rightIcon || (closeable ? /*#__PURE__*/ _react.default.createElement(_iconsreacttaro.Close, {
|
|
129
|
+
size: 12
|
|
130
|
+
}) : null)) : null));
|
|
100
131
|
};
|
|
101
132
|
function open(selector) {
|
|
102
133
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/*入场动画过程*/
|
|
7
7
|
.fade-enter-active {
|
|
8
8
|
opacity: 1;
|
|
9
|
-
transition: opacity
|
|
9
|
+
transition: opacity 300ms ease-in;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/*入场动画结束*/
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/*离场动画过程*/
|
|
23
23
|
.fade-exit-active {
|
|
24
24
|
opacity: 0;
|
|
25
|
-
transition: opacity
|
|
25
|
+
transition: opacity 300ms ease-out;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/*离场动画结束*/
|
|
@@ -38,56 +38,59 @@
|
|
|
38
38
|
/*页面第一次加载时的动画过程*/
|
|
39
39
|
.fade-appear-active {
|
|
40
40
|
opacity: 1;
|
|
41
|
-
transition: opacity
|
|
41
|
+
transition: opacity 300ms;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.nut-notify {
|
|
45
|
+
position: fixed;
|
|
46
|
+
left: 8px;
|
|
47
|
+
right: 8px;
|
|
48
|
+
z-index: $notify-z-index;
|
|
45
49
|
display: flex;
|
|
46
|
-
justify-content: center;
|
|
47
50
|
align-items: center;
|
|
48
51
|
box-sizing: border-box;
|
|
49
|
-
padding: $notify-padding;
|
|
50
|
-
color: $notify-text-color;
|
|
51
|
-
font-size: $notify-font-size;
|
|
52
|
-
white-space: pre-wrap;
|
|
53
|
-
word-wrap: break-word;
|
|
54
52
|
height: $notify-height;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&-popup-bottom {
|
|
71
|
-
bottom: 0;
|
|
53
|
+
padding: $notify-padding;
|
|
54
|
+
border-radius: $notify-border-radius;
|
|
55
|
+
box-shadow: $notify-box-shadow;
|
|
56
|
+
background-color: $notify-background-color;
|
|
57
|
+
|
|
58
|
+
&-content {
|
|
59
|
+
flex: 1;
|
|
60
|
+
text-align: center;
|
|
61
|
+
min-width: 0;
|
|
62
|
+
font-size: $notify-font-size;
|
|
63
|
+
color: $notify-text-color;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
overflow: hidden;
|
|
72
66
|
}
|
|
73
67
|
|
|
74
|
-
&-
|
|
75
|
-
|
|
68
|
+
&-ellipsis {
|
|
69
|
+
text-overflow: ellipsis;
|
|
76
70
|
}
|
|
77
71
|
|
|
78
|
-
&-
|
|
79
|
-
|
|
72
|
+
&-layout-left {
|
|
73
|
+
text-align: left;
|
|
80
74
|
}
|
|
81
75
|
|
|
82
|
-
&-
|
|
83
|
-
|
|
76
|
+
&-left-icon,
|
|
77
|
+
&-right-icon {
|
|
78
|
+
display: inline-flex;
|
|
84
79
|
}
|
|
85
80
|
|
|
86
|
-
&-
|
|
87
|
-
|
|
81
|
+
&-left-icon {
|
|
82
|
+
margin-right: 6px;
|
|
83
|
+
.nut-icon {
|
|
84
|
+
height: 16px;
|
|
85
|
+
width: 16px;
|
|
86
|
+
}
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
&-
|
|
91
|
-
|
|
89
|
+
&-right-icon {
|
|
90
|
+
margin-left: 6px;
|
|
91
|
+
.nut-icon {
|
|
92
|
+
height: 12px;
|
|
93
|
+
width: 12px;
|
|
94
|
+
}
|
|
92
95
|
}
|
|
93
96
|
}
|