antd-mobile 5.12.1 → 5.12.4
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/2x/cjs/components/badge/badge.d.ts +1 -1
- package/2x/cjs/components/badge/badge.js +3 -1
- package/2x/cjs/components/badge/index.d.ts +1 -1
- package/2x/cjs/components/button/button.d.ts +6 -4
- package/2x/cjs/components/button/button.js +5 -1
- package/2x/cjs/components/calendar/calendar.js +2 -2
- package/2x/cjs/components/dialog/dialog.d.ts +2 -1
- package/2x/cjs/components/dropdown/dropdown.css +1 -1
- package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
- package/2x/cjs/components/error-block/images/default.d.ts +1 -0
- package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
- package/2x/cjs/components/image/broken-image-icon.d.ts +1 -0
- package/2x/cjs/components/image/broken-image-icon.js +21 -0
- package/2x/cjs/components/image/image-icon.d.ts +1 -0
- package/2x/cjs/components/image/image-icon.js +21 -0
- package/2x/cjs/components/image/image.css +4 -2
- package/2x/cjs/components/image/image.d.ts +1 -1
- package/2x/cjs/components/image/image.js +6 -4
- package/2x/cjs/components/image-uploader/image-uploader.js +1 -4
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/cjs/components/modal/modal.d.ts +2 -1
- package/2x/cjs/components/popup/popup.d.ts +2 -1
- package/2x/cjs/components/search-bar/search-bar.js +5 -8
- package/2x/cjs/components/side-bar/side-bar.d.ts +2 -1
- package/2x/cjs/components/tabs/tabs.css +4 -3
- package/2x/cjs/components/tabs/tabs.d.ts +1 -1
- package/2x/cjs/components/toast/toast.css +1 -1
- package/2x/cjs/components/toast/toast.d.ts +2 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/es/components/badge/badge.d.ts +1 -1
- package/2x/es/components/badge/badge.js +1 -1
- package/2x/es/components/badge/index.d.ts +1 -1
- package/2x/es/components/button/button.d.ts +6 -4
- package/2x/es/components/button/button.js +5 -1
- package/2x/es/components/calendar/calendar.js +2 -2
- package/2x/es/components/dialog/dialog.d.ts +2 -1
- package/2x/es/components/dropdown/dropdown.css +1 -1
- package/2x/es/components/error-block/images/busy.d.ts +1 -0
- package/2x/es/components/error-block/images/default.d.ts +1 -0
- package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/es/components/error-block/images/empty.d.ts +1 -0
- package/2x/es/components/image/broken-image-icon.d.ts +1 -0
- package/2x/es/components/image/broken-image-icon.js +9 -0
- package/2x/es/components/image/image-icon.d.ts +1 -0
- package/2x/es/components/image/image-icon.js +9 -0
- package/2x/es/components/image/image.css +4 -2
- package/2x/es/components/image/image.d.ts +1 -1
- package/2x/es/components/image/image.js +4 -3
- package/2x/es/components/image-uploader/image-uploader.js +2 -5
- package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/es/components/modal/modal.d.ts +2 -1
- package/2x/es/components/popup/popup.d.ts +2 -1
- package/2x/es/components/search-bar/search-bar.js +5 -8
- package/2x/es/components/side-bar/side-bar.d.ts +2 -1
- package/2x/es/components/tabs/tabs.css +4 -3
- package/2x/es/components/tabs/tabs.d.ts +1 -1
- package/2x/es/components/toast/toast.css +1 -1
- package/2x/es/components/toast/toast.d.ts +2 -1
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/package.json +3 -8
- package/bundle/antd-mobile.cjs.js +39 -24
- package/bundle/antd-mobile.es.js +40 -25
- package/bundle/style.css +10 -7
- package/cjs/components/badge/badge.d.ts +1 -1
- package/cjs/components/badge/badge.js +3 -1
- package/cjs/components/badge/index.d.ts +1 -1
- package/cjs/components/button/button.d.ts +6 -4
- package/cjs/components/button/button.js +5 -1
- package/cjs/components/calendar/calendar.js +2 -2
- package/cjs/components/dialog/dialog.d.ts +2 -1
- package/cjs/components/dropdown/dropdown.css +1 -1
- package/cjs/components/error-block/images/busy.d.ts +1 -0
- package/cjs/components/error-block/images/default.d.ts +1 -0
- package/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/cjs/components/error-block/images/empty.d.ts +1 -0
- package/cjs/components/image/broken-image-icon.d.ts +1 -0
- package/cjs/components/image/broken-image-icon.js +21 -0
- package/cjs/components/image/image-icon.d.ts +1 -0
- package/cjs/components/image/image-icon.js +21 -0
- package/cjs/components/image/image.css +4 -2
- package/cjs/components/image/image.d.ts +1 -1
- package/cjs/components/image/image.js +6 -4
- package/cjs/components/image-uploader/image-uploader.js +1 -4
- package/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/cjs/components/modal/modal.d.ts +2 -1
- package/cjs/components/popup/popup.d.ts +2 -1
- package/cjs/components/search-bar/search-bar.js +5 -8
- package/cjs/components/side-bar/side-bar.d.ts +2 -1
- package/cjs/components/tabs/tabs.css +4 -3
- package/cjs/components/tabs/tabs.d.ts +1 -1
- package/cjs/components/toast/toast.css +1 -1
- package/cjs/components/toast/toast.d.ts +2 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/es/components/badge/badge.d.ts +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/index.d.ts +1 -1
- package/es/components/button/button.d.ts +6 -4
- package/es/components/button/button.js +5 -1
- package/es/components/calendar/calendar.js +2 -2
- package/es/components/dialog/dialog.d.ts +2 -1
- package/es/components/dropdown/dropdown.css +1 -1
- package/es/components/error-block/images/busy.d.ts +1 -0
- package/es/components/error-block/images/default.d.ts +1 -0
- package/es/components/error-block/images/disconnected.d.ts +1 -0
- package/es/components/error-block/images/empty.d.ts +1 -0
- package/es/components/image/broken-image-icon.d.ts +1 -0
- package/es/components/image/broken-image-icon.js +9 -0
- package/es/components/image/image-icon.d.ts +1 -0
- package/es/components/image/image-icon.js +9 -0
- package/es/components/image/image.css +4 -2
- package/es/components/image/image.d.ts +1 -1
- package/es/components/image/image.js +4 -3
- package/es/components/image-uploader/image-uploader.js +2 -5
- package/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/es/components/modal/modal.d.ts +2 -1
- package/es/components/popup/popup.d.ts +2 -1
- package/es/components/search-bar/search-bar.js +5 -8
- package/es/components/side-bar/side-bar.d.ts +2 -1
- package/es/components/tabs/tabs.css +4 -3
- package/es/components/tabs/tabs.d.ts +1 -1
- package/es/components/toast/toast.css +1 -1
- package/es/components/toast/toast.d.ts +2 -1
- package/es/utils/get-scroll-parent.js +1 -1
- package/package.json +3 -8
- package/umd/antd-mobile.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BrokenImageIcon: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BrokenImageIcon = () => React.createElement("svg", {
|
|
3
|
+
viewBox: '0 0 48 48',
|
|
4
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
|
5
|
+
}, React.createElement("path", {
|
|
6
|
+
d: 'M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z',
|
|
7
|
+
fill: '#DBDBDB',
|
|
8
|
+
fillRule: 'nonzero'
|
|
9
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImageIcon: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const ImageIcon = () => React.createElement("svg", {
|
|
3
|
+
viewBox: '0 0 48 48',
|
|
4
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
|
5
|
+
}, React.createElement("path", {
|
|
6
|
+
d: 'M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z',
|
|
7
|
+
fill: '#DBDBDB',
|
|
8
|
+
fillRule: 'nonzero'
|
|
9
|
+
}));
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
}
|
|
13
13
|
.adm-image-tip {
|
|
14
14
|
position: relative;
|
|
15
|
-
background-color: #
|
|
15
|
+
background-color: #f5f5f5;
|
|
16
16
|
height: 100%;
|
|
17
17
|
min-height: 24px;
|
|
18
18
|
min-width: 24px;
|
|
19
19
|
}
|
|
20
|
-
.adm-image-tip >
|
|
20
|
+
.adm-image-tip > svg {
|
|
21
|
+
width: 24px;
|
|
22
|
+
height: 24px;
|
|
21
23
|
position: absolute;
|
|
22
24
|
left: 50%;
|
|
23
25
|
top: 50%;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { mergeProps } from '../../utils/with-default-props';
|
|
2
2
|
import React, { useState, useRef } from 'react';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
|
-
import { PictureOutline, PictureWrongOutline } from 'antd-mobile-icons';
|
|
5
4
|
import { staged } from 'staged-components';
|
|
6
5
|
import { toCSSLength } from '../../utils/to-css-length';
|
|
7
6
|
import { LazyDetector } from './lazy-detector';
|
|
8
7
|
import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-update-layout-effect';
|
|
8
|
+
import { ImageIcon } from './image-icon';
|
|
9
|
+
import { BrokenImageIcon } from './broken-image-icon';
|
|
9
10
|
const classPrefix = `adm-image`;
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
fit: 'fill',
|
|
12
13
|
placeholder: React.createElement("div", {
|
|
13
14
|
className: `${classPrefix}-tip`
|
|
14
|
-
}, React.createElement(
|
|
15
|
+
}, React.createElement(ImageIcon, null)),
|
|
15
16
|
fallback: React.createElement("div", {
|
|
16
17
|
className: `${classPrefix}-tip`
|
|
17
|
-
}, React.createElement(
|
|
18
|
+
}, React.createElement(BrokenImageIcon, null)),
|
|
18
19
|
lazy: false
|
|
19
20
|
};
|
|
20
21
|
export const Image = staged(p => {
|
|
@@ -5,7 +5,7 @@ import { mergeProps } from '../../utils/with-default-props';
|
|
|
5
5
|
import ImageViewer from '../image-viewer';
|
|
6
6
|
import PreviewItem from './preview-item';
|
|
7
7
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
8
|
-
import { useIsomorphicLayoutEffect,
|
|
8
|
+
import { useIsomorphicLayoutEffect, useUnmount } from 'ahooks';
|
|
9
9
|
import Space from '../space';
|
|
10
10
|
import { withNativeProps } from '../../utils/native-props';
|
|
11
11
|
import { useConfig } from '../config-provider';
|
|
@@ -28,9 +28,6 @@ export const ImageUploader = p => {
|
|
|
28
28
|
} = useConfig();
|
|
29
29
|
const props = mergeProps(defaultProps, p);
|
|
30
30
|
const [value, setValue] = usePropsValue(props);
|
|
31
|
-
const updateValue = useMemoizedFn(updater => {
|
|
32
|
-
setValue(updater(value));
|
|
33
|
-
});
|
|
34
31
|
const [tasks, setTasks] = useState([]);
|
|
35
32
|
useIsomorphicLayoutEffect(() => {
|
|
36
33
|
setTasks(prev => prev.filter(task => {
|
|
@@ -109,7 +106,7 @@ export const ImageUploader = p => {
|
|
|
109
106
|
return task;
|
|
110
107
|
});
|
|
111
108
|
});
|
|
112
|
-
|
|
109
|
+
setValue(prev => {
|
|
113
110
|
const newVal = Object.assign({}, result);
|
|
114
111
|
return [...prev, newVal];
|
|
115
112
|
});
|
|
@@ -27,9 +27,11 @@ export const InfiniteScroll = p => {
|
|
|
27
27
|
threshold: 250
|
|
28
28
|
}, p);
|
|
29
29
|
const doLoadMore = useLockFn(() => props.loadMore());
|
|
30
|
-
const elementRef = useRef(null);
|
|
30
|
+
const elementRef = useRef(null); // Prevent duplicated trigger of `check` function
|
|
31
|
+
|
|
31
32
|
const [flag, setFlag] = useState({});
|
|
32
33
|
const nextFlagRef = useRef(flag);
|
|
34
|
+
const [scrollParent, setScrollParent] = useState();
|
|
33
35
|
const check = useMemoizedFn(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
36
|
if (nextFlagRef.current !== flag) return;
|
|
35
37
|
if (!props.hasMore) return;
|
|
@@ -37,6 +39,7 @@ export const InfiniteScroll = p => {
|
|
|
37
39
|
if (!element) return;
|
|
38
40
|
if (!element.offsetParent) return;
|
|
39
41
|
const parent = getScrollParent(element);
|
|
42
|
+
setScrollParent(parent);
|
|
40
43
|
if (!parent) return;
|
|
41
44
|
const rect = element.getBoundingClientRect();
|
|
42
45
|
const elementTop = rect.top;
|
|
@@ -56,18 +59,17 @@ export const InfiniteScroll = p => {
|
|
|
56
59
|
useEffect(() => {
|
|
57
60
|
const element = elementRef.current;
|
|
58
61
|
if (!element) return;
|
|
59
|
-
|
|
60
|
-
if (!parent) return;
|
|
62
|
+
if (!scrollParent) return;
|
|
61
63
|
|
|
62
64
|
function onScroll() {
|
|
63
65
|
check();
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
scrollParent.addEventListener('scroll', onScroll);
|
|
67
69
|
return () => {
|
|
68
|
-
|
|
70
|
+
scrollParent.removeEventListener('scroll', onScroll);
|
|
69
71
|
};
|
|
70
|
-
}, []);
|
|
72
|
+
}, [scrollParent]);
|
|
71
73
|
return withNativeProps(props, React.createElement("div", {
|
|
72
74
|
className: classPrefix,
|
|
73
75
|
ref: elementRef
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
import type { MaskProps } from '../mask';
|
|
2
3
|
import { Action } from './modal-action-button';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
@@ -19,7 +20,7 @@ export declare type ModalProps = {
|
|
|
19
20
|
getContainer?: GetContainer;
|
|
20
21
|
bodyStyle?: React.CSSProperties;
|
|
21
22
|
bodyClassName?: string;
|
|
22
|
-
maskStyle?:
|
|
23
|
+
maskStyle?: MaskProps['style'];
|
|
23
24
|
maskClassName?: string;
|
|
24
25
|
stopPropagation?: PropagationEvent[];
|
|
25
26
|
showCloseButton?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
import type { MaskProps } from '../mask';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
5
6
|
export declare type PopupProps = {
|
|
@@ -15,7 +16,7 @@ export declare type PopupProps = {
|
|
|
15
16
|
bodyClassName?: string;
|
|
16
17
|
bodyStyle?: React.CSSProperties;
|
|
17
18
|
maskClassName?: string;
|
|
18
|
-
maskStyle?:
|
|
19
|
+
maskStyle?: MaskProps['style'];
|
|
19
20
|
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
20
21
|
stopPropagation?: PropagationEvent[];
|
|
21
22
|
children?: React.ReactNode;
|
|
@@ -52,7 +52,7 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
52
52
|
}));
|
|
53
53
|
|
|
54
54
|
const renderCancelButton = () => {
|
|
55
|
-
let isShowCancel
|
|
55
|
+
let isShowCancel;
|
|
56
56
|
|
|
57
57
|
if (typeof props.showCancelButton === 'function') {
|
|
58
58
|
isShowCancel = props.showCancelButton(hasFocus, value);
|
|
@@ -61,13 +61,7 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
return isShowCancel && React.createElement("div", {
|
|
64
|
-
className: `${classPrefix}-suffix
|
|
65
|
-
onMouseDown: e => {
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
},
|
|
68
|
-
onTouchStart: e => {
|
|
69
|
-
e.preventDefault();
|
|
70
|
-
}
|
|
64
|
+
className: `${classPrefix}-suffix`
|
|
71
65
|
}, React.createElement(Button, {
|
|
72
66
|
fill: 'none',
|
|
73
67
|
className: `${classPrefix}-cancel-button`,
|
|
@@ -80,6 +74,9 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
80
74
|
|
|
81
75
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
82
76
|
(_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
77
|
+
},
|
|
78
|
+
onMouseDown: e => {
|
|
79
|
+
e.preventDefault();
|
|
83
80
|
}
|
|
84
81
|
}, props.cancelText));
|
|
85
82
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { BadgeProps } from '../badge';
|
|
3
4
|
import { NativeProps } from '../../utils/native-props';
|
|
4
5
|
export declare type SideBarItemProps = {
|
|
5
6
|
title?: ReactNode;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
badge?:
|
|
8
|
+
badge?: BadgeProps['content'];
|
|
8
9
|
} & NativeProps;
|
|
9
10
|
export declare const SideBarItem: FC<SideBarItemProps>;
|
|
10
11
|
export declare type SideBarProps = {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
--content-padding: 12px;
|
|
4
4
|
--active-line-height: 2px;
|
|
5
5
|
--active-line-border-radius: var(--active-line-height);
|
|
6
|
+
--active-line-color: var(--adm-color-primary);
|
|
7
|
+
--active-title-color: var(--adm-color-primary);
|
|
6
8
|
position: relative;
|
|
7
9
|
min-width: 0;
|
|
8
10
|
}
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
cursor: pointer;
|
|
39
41
|
}
|
|
40
42
|
.adm-tabs-tab-active {
|
|
41
|
-
color: var(--
|
|
43
|
+
color: var(--active-title-color);
|
|
42
44
|
}
|
|
43
45
|
.adm-tabs-tab-disabled {
|
|
44
46
|
opacity: 0.5;
|
|
@@ -48,8 +50,7 @@
|
|
|
48
50
|
position: absolute;
|
|
49
51
|
bottom: 0;
|
|
50
52
|
height: var(--active-line-height);
|
|
51
|
-
|
|
52
|
-
background: var(--adm-color-primary);
|
|
53
|
+
background: var(--active-line-color);
|
|
53
54
|
border-radius: var(--active-line-border-radius);
|
|
54
55
|
}
|
|
55
56
|
.adm-tabs-content {
|
|
@@ -15,5 +15,5 @@ export declare type TabsProps = {
|
|
|
15
15
|
stretch?: boolean;
|
|
16
16
|
onChange?: (key: string) => void;
|
|
17
17
|
children?: React.ReactNode;
|
|
18
|
-
} & NativeProps<'--fixed-active-line-width' | '--active-line-height' | '--active-line-border-radius' | '--title-font-size' | '--content-padding'>;
|
|
18
|
+
} & NativeProps<'--fixed-active-line-width' | '--active-line-height' | '--active-line-border-radius' | '--title-font-size' | '--content-padding' | '--active-title-color' | '--active-line-color'>;
|
|
19
19
|
export declare const Tabs: FC<TabsProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import type { MaskProps } from '../mask';
|
|
2
3
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
export interface ToastProps {
|
|
5
6
|
afterClose?: () => void;
|
|
6
|
-
maskStyle?:
|
|
7
|
+
maskStyle?: MaskProps['style'];
|
|
7
8
|
maskClassName?: string;
|
|
8
9
|
maskClickable?: boolean;
|
|
9
10
|
content?: ReactNode;
|
|
@@ -19,7 +19,7 @@ export function getScrollParent(el, root = defaultRoot) {
|
|
|
19
19
|
overflowY
|
|
20
20
|
} = window.getComputedStyle(node);
|
|
21
21
|
|
|
22
|
-
if (overflowStylePatterns.includes(overflowY)) {
|
|
22
|
+
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
23
23
|
return node;
|
|
24
24
|
}
|
|
25
25
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-mobile",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.4",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@floating-ui/dom": "^0.4.5",
|
|
6
6
|
"@react-spring/web": "^9.4.5",
|
|
7
|
-
"@
|
|
8
|
-
"@types/react-is": "^17.0.3",
|
|
9
|
-
"@types/react-virtualized": "^9.21.21",
|
|
10
|
-
"@types/resize-observer-browser": "^0.1.7",
|
|
11
|
-
"@use-gesture/react": "^10.2.12",
|
|
7
|
+
"@use-gesture/react": "10.2.14",
|
|
12
8
|
"ahooks": "^3.3.10",
|
|
13
9
|
"antd-mobile-icons": "^0.2.2",
|
|
14
10
|
"antd-mobile-v5-count": "^1.0.1",
|
|
@@ -43,6 +39,5 @@
|
|
|
43
39
|
"url": "git+https://github.com/ant-design/ant-design-mobile.git",
|
|
44
40
|
"branch": "master",
|
|
45
41
|
"platform": "github"
|
|
46
|
-
}
|
|
47
|
-
"packageManager": "yarn@3.2.0"
|
|
42
|
+
}
|
|
48
43
|
}
|