antd-mobile 5.0.0-rc.24 → 5.0.0-rc.28
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/README.md +1 -1
- package/2x/cjs/components/button/button.css +2 -2
- package/2x/cjs/components/calendar/calendar.d.ts +1 -0
- package/2x/cjs/components/calendar/calendar.js +8 -1
- package/2x/cjs/components/checkbox/checkbox.js +12 -12
- package/2x/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/2x/cjs/components/dialog/dialog.css +4 -0
- package/2x/cjs/components/dropdown/dropdown.css +0 -4
- package/2x/cjs/components/dropdown/item.js +3 -1
- package/2x/cjs/components/ellipsis/ellipsis.js +3 -1
- package/2x/cjs/components/empty/empty.css +1 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +7 -5
- package/2x/cjs/components/floating-panel/floating-panel.js +11 -1
- package/2x/cjs/components/form/form-item.css +17 -10
- package/2x/cjs/components/form/form-item.d.ts +1 -1
- package/2x/cjs/components/form/form-item.js +17 -8
- package/2x/cjs/components/form/form.css +0 -9
- package/2x/cjs/components/form/form.js +1 -1
- package/2x/cjs/components/form/index.css +17 -19
- package/2x/cjs/components/image-uploader/image-uploader.d.ts +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.js +2 -2
- package/2x/cjs/components/image-viewer/image-viewer.css +2 -0
- package/2x/cjs/components/image-viewer/image-viewer.js +12 -2
- package/2x/cjs/components/image-viewer/slide.js +11 -7
- package/2x/cjs/components/image-viewer/slides.d.ts +1 -1
- package/2x/cjs/components/index-bar/index-bar.css +2 -1
- package/2x/cjs/components/input/input.css +1 -0
- package/2x/cjs/components/input/input.d.ts +6 -2
- package/2x/cjs/components/input/input.js +20 -2
- package/2x/cjs/components/list/list.css +6 -4
- package/2x/cjs/components/picker/picker.d.ts +1 -0
- package/2x/cjs/components/picker/picker.js +3 -1
- package/2x/cjs/components/picker-view/wheel.js +4 -2
- package/2x/cjs/components/popover/index.d.ts +4 -6
- package/2x/cjs/components/popover/popover-menu.d.ts +9 -12
- package/2x/cjs/components/progress-bar/progress-bar.css +1 -1
- package/2x/cjs/components/progress-circle/progress-circle.css +4 -4
- package/2x/cjs/components/progress-circle/progress-circle.js +1 -2
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +7 -1
- package/2x/cjs/components/radio/radio.js +16 -3
- package/2x/cjs/components/rate/rate.css +2 -1
- package/2x/cjs/components/rate/rate.d.ts +1 -1
- package/2x/cjs/components/selector/selector.css +14 -6
- package/2x/cjs/components/selector/selector.d.ts +2 -1
- package/2x/cjs/components/selector/selector.js +3 -2
- package/2x/cjs/components/slider/slider.css +12 -7
- package/2x/cjs/components/slider/thumb-icon.d.ts +3 -0
- package/2x/cjs/components/slider/thumb-icon.js +38 -0
- package/2x/cjs/components/slider/thumb.js +5 -1
- package/2x/cjs/components/swiper/swiper.js +1 -1
- package/2x/cjs/components/tabs/tabs.js +5 -5
- package/2x/cjs/components/text-area/text-area.js +11 -1
- package/2x/cjs/components/virtual-input/virtual-input.js +3 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/cjs/utils/is-dev.js +1 -1
- package/2x/cjs/utils/use-ref-state.js +1 -1
- package/2x/cjs/utils/use-resize-effect.js +1 -3
- package/2x/cjs/utils/use-tab-list-scroll.js +1 -3
- package/2x/es/components/button/button.css +2 -2
- package/2x/es/components/calendar/calendar.d.ts +1 -0
- package/2x/es/components/calendar/calendar.js +8 -2
- package/2x/es/components/checkbox/checkbox.js +11 -12
- package/2x/es/components/date-picker/date-picker.d.ts +1 -1
- package/2x/es/components/dialog/dialog.css +4 -0
- package/2x/es/components/dropdown/dropdown.css +0 -4
- package/2x/es/components/dropdown/item.js +3 -1
- package/2x/es/components/ellipsis/ellipsis.js +3 -2
- package/2x/es/components/empty/empty.css +1 -1
- package/2x/es/components/floating-bubble/floating-bubble.css +1 -0
- package/2x/es/components/floating-panel/floating-panel.d.ts +7 -5
- package/2x/es/components/floating-panel/floating-panel.js +9 -1
- package/2x/es/components/form/form-item.css +17 -10
- package/2x/es/components/form/form-item.d.ts +1 -1
- package/2x/es/components/form/form-item.js +15 -6
- package/2x/es/components/form/form.css +0 -9
- package/2x/es/components/form/form.js +1 -1
- package/2x/es/components/form/index.css +17 -19
- package/2x/es/components/image-uploader/image-uploader.d.ts +1 -1
- package/2x/es/components/image-uploader/image-uploader.js +4 -4
- package/2x/es/components/image-viewer/image-viewer.css +2 -0
- package/2x/es/components/image-viewer/image-viewer.js +13 -3
- package/2x/es/components/image-viewer/slide.js +11 -7
- package/2x/es/components/image-viewer/slides.d.ts +1 -1
- package/2x/es/components/index-bar/index-bar.css +2 -1
- package/2x/es/components/input/input.css +1 -0
- package/2x/es/components/input/input.d.ts +6 -2
- package/2x/es/components/input/input.js +19 -3
- package/2x/es/components/list/list.css +6 -4
- package/2x/es/components/picker/picker.d.ts +1 -0
- package/2x/es/components/picker/picker.js +3 -1
- package/2x/es/components/picker-view/wheel.js +4 -3
- package/2x/es/components/popover/index.d.ts +4 -6
- package/2x/es/components/popover/popover-menu.d.ts +9 -12
- package/2x/es/components/progress-bar/progress-bar.css +1 -1
- package/2x/es/components/progress-circle/progress-circle.css +4 -4
- package/2x/es/components/progress-circle/progress-circle.js +1 -2
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +8 -2
- package/2x/es/components/radio/radio.js +14 -3
- package/2x/es/components/rate/rate.css +2 -1
- package/2x/es/components/rate/rate.d.ts +1 -1
- package/2x/es/components/selector/selector.css +14 -6
- package/2x/es/components/selector/selector.d.ts +2 -1
- package/2x/es/components/selector/selector.js +3 -2
- package/2x/es/components/slider/slider.css +12 -7
- package/2x/es/components/slider/thumb-icon.d.ts +3 -0
- package/2x/es/components/slider/thumb-icon.js +25 -0
- package/2x/es/components/slider/thumb.js +4 -1
- package/2x/es/components/swiper/swiper.js +3 -3
- package/2x/es/components/tabs/tabs.js +7 -7
- package/2x/es/components/text-area/text-area.js +10 -1
- package/2x/es/components/virtual-input/virtual-input.js +3 -2
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/es/utils/is-dev.js +1 -1
- package/2x/es/utils/use-ref-state.js +2 -2
- package/2x/es/utils/use-resize-effect.js +2 -3
- package/2x/es/utils/use-tab-list-scroll.js +2 -3
- package/2x/package.json +7 -6
- package/README.md +1 -1
- package/cjs/components/button/button.css +2 -2
- package/cjs/components/calendar/calendar.d.ts +1 -0
- package/cjs/components/calendar/calendar.js +8 -1
- package/cjs/components/checkbox/checkbox.js +12 -12
- package/cjs/components/date-picker/date-picker.d.ts +1 -1
- package/cjs/components/dialog/dialog.css +3 -0
- package/cjs/components/dropdown/dropdown.css +0 -3
- package/cjs/components/dropdown/item.js +3 -1
- package/cjs/components/ellipsis/ellipsis.js +3 -1
- package/cjs/components/empty/empty.css +1 -1
- package/cjs/components/floating-bubble/floating-bubble.css +1 -0
- package/cjs/components/floating-panel/floating-panel.d.ts +7 -5
- package/cjs/components/floating-panel/floating-panel.js +11 -1
- package/cjs/components/form/form-item.css +15 -9
- package/cjs/components/form/form-item.d.ts +1 -1
- package/cjs/components/form/form-item.js +17 -8
- package/cjs/components/form/form.css +0 -7
- package/cjs/components/form/form.js +1 -1
- package/cjs/components/form/index.css +15 -16
- package/cjs/components/image-uploader/image-uploader.d.ts +1 -1
- package/cjs/components/image-uploader/image-uploader.js +2 -2
- package/cjs/components/image-viewer/image-viewer.css +2 -0
- package/cjs/components/image-viewer/image-viewer.js +12 -2
- package/cjs/components/image-viewer/slide.js +11 -7
- package/cjs/components/image-viewer/slides.d.ts +1 -1
- package/cjs/components/index-bar/index-bar.css +2 -1
- package/cjs/components/input/input.css +1 -0
- package/cjs/components/input/input.d.ts +6 -2
- package/cjs/components/input/input.js +20 -2
- package/cjs/components/list/list.css +5 -4
- package/cjs/components/picker/picker.d.ts +1 -0
- package/cjs/components/picker/picker.js +3 -1
- package/cjs/components/picker-view/wheel.js +4 -2
- package/cjs/components/popover/index.d.ts +4 -6
- package/cjs/components/popover/popover-menu.d.ts +9 -12
- package/cjs/components/progress-bar/progress-bar.css +1 -1
- package/cjs/components/progress-circle/progress-circle.css +4 -4
- package/cjs/components/progress-circle/progress-circle.js +1 -2
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +7 -1
- package/cjs/components/radio/radio.js +16 -3
- package/cjs/components/rate/rate.css +2 -1
- package/cjs/components/rate/rate.d.ts +1 -1
- package/cjs/components/selector/selector.css +14 -6
- package/cjs/components/selector/selector.d.ts +2 -1
- package/cjs/components/selector/selector.js +3 -2
- package/cjs/components/slider/slider.css +11 -7
- package/cjs/components/slider/thumb-icon.d.ts +3 -0
- package/cjs/components/slider/thumb-icon.js +38 -0
- package/cjs/components/slider/thumb.js +5 -1
- package/cjs/components/swiper/swiper.js +1 -1
- package/cjs/components/tabs/tabs.js +5 -5
- package/cjs/components/text-area/text-area.js +11 -1
- package/cjs/components/virtual-input/virtual-input.js +3 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/cjs/utils/is-dev.js +1 -1
- package/cjs/utils/use-ref-state.js +1 -1
- package/cjs/utils/use-resize-effect.js +1 -3
- package/cjs/utils/use-tab-list-scroll.js +1 -3
- package/es/components/button/button.css +2 -2
- package/es/components/calendar/calendar.d.ts +1 -0
- package/es/components/calendar/calendar.js +8 -2
- package/es/components/checkbox/checkbox.js +11 -12
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/dialog/dialog.css +3 -0
- package/es/components/dropdown/dropdown.css +0 -3
- package/es/components/dropdown/item.js +3 -1
- package/es/components/ellipsis/ellipsis.js +3 -2
- package/es/components/empty/empty.css +1 -1
- package/es/components/floating-bubble/floating-bubble.css +1 -0
- package/es/components/floating-panel/floating-panel.d.ts +7 -5
- package/es/components/floating-panel/floating-panel.js +9 -1
- package/es/components/form/form-item.css +15 -9
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/form/form-item.js +15 -6
- package/es/components/form/form.css +0 -7
- package/es/components/form/form.js +1 -1
- package/es/components/form/index.css +15 -16
- package/es/components/image-uploader/image-uploader.d.ts +1 -1
- package/es/components/image-uploader/image-uploader.js +4 -4
- package/es/components/image-viewer/image-viewer.css +2 -0
- package/es/components/image-viewer/image-viewer.js +13 -3
- package/es/components/image-viewer/slide.js +11 -7
- package/es/components/image-viewer/slides.d.ts +1 -1
- package/es/components/index-bar/index-bar.css +2 -1
- package/es/components/input/input.css +1 -0
- package/es/components/input/input.d.ts +6 -2
- package/es/components/input/input.js +19 -3
- package/es/components/list/list.css +5 -4
- package/es/components/picker/picker.d.ts +1 -0
- package/es/components/picker/picker.js +3 -1
- package/es/components/picker-view/wheel.js +4 -3
- package/es/components/popover/index.d.ts +4 -6
- package/es/components/popover/popover-menu.d.ts +9 -12
- package/es/components/progress-bar/progress-bar.css +1 -1
- package/es/components/progress-circle/progress-circle.css +4 -4
- package/es/components/progress-circle/progress-circle.js +1 -2
- package/es/components/pull-to-refresh/pull-to-refresh.js +8 -2
- package/es/components/radio/radio.js +14 -3
- package/es/components/rate/rate.css +2 -1
- package/es/components/rate/rate.d.ts +1 -1
- package/es/components/selector/selector.css +14 -6
- package/es/components/selector/selector.d.ts +2 -1
- package/es/components/selector/selector.js +3 -2
- package/es/components/slider/slider.css +11 -7
- package/es/components/slider/thumb-icon.d.ts +3 -0
- package/es/components/slider/thumb-icon.js +25 -0
- package/es/components/slider/thumb.js +4 -1
- package/es/components/swiper/swiper.js +3 -3
- package/es/components/tabs/tabs.js +7 -7
- package/es/components/text-area/text-area.js +10 -1
- package/es/components/virtual-input/virtual-input.js +3 -2
- package/es/utils/get-scroll-parent.js +1 -1
- package/es/utils/is-dev.js +1 -1
- package/es/utils/use-ref-state.js +2 -2
- package/es/utils/use-resize-effect.js +2 -3
- package/es/utils/use-tab-list-scroll.js +2 -3
- package/package.json +7 -6
- package/umd/antd-mobile.js +1 -1
- package/2x/assets/slider-thumb.svg +0 -14
- package/2x/cjs/assets/slider-thumb.svg +0 -14
- package/2x/es/assets/slider-thumb.svg +0 -14
- package/assets/slider-thumb.svg +0 -14
- package/cjs/assets/slider-thumb.svg +0 -14
- package/es/assets/slider-thumb.svg +0 -14
|
@@ -13,6 +13,8 @@ var _usePropsValue = require("../../utils/use-props-value");
|
|
|
13
13
|
|
|
14
14
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
15
15
|
|
|
16
|
+
var _devLog = require("../../utils/dev-log");
|
|
17
|
+
|
|
16
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
19
|
|
|
18
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -31,7 +33,14 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
|
31
33
|
showCount,
|
|
32
34
|
maxLength
|
|
33
35
|
} = props;
|
|
34
|
-
const [value, setValue] = (0, _usePropsValue.usePropsValue)(props)
|
|
36
|
+
const [value, setValue] = (0, _usePropsValue.usePropsValue)(Object.assign(Object.assign({}, props), {
|
|
37
|
+
value: props.value === null ? '' : props.value
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
if (props.value === null) {
|
|
41
|
+
(0, _devLog.devError)('TextArea', '`value` prop on `TextArea` should not be `null`. Consider using an empty string to clear the component.');
|
|
42
|
+
}
|
|
43
|
+
|
|
35
44
|
const nativeTextAreaRef = (0, _react.useRef)(null);
|
|
36
45
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
37
46
|
clear: () => {
|
|
@@ -89,6 +98,7 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
|
|
|
89
98
|
className: `${classPrefix}-element`,
|
|
90
99
|
rows: props.rows,
|
|
91
100
|
value: value,
|
|
101
|
+
placeholder: props.placeholder,
|
|
92
102
|
onChange: e => {
|
|
93
103
|
let v = e.target.value;
|
|
94
104
|
|
|
@@ -17,6 +17,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
17
17
|
|
|
18
18
|
var _antdMobileIcons = require("antd-mobile-icons");
|
|
19
19
|
|
|
20
|
+
var _ahooks = require("ahooks");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -47,7 +49,7 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
47
49
|
content.scrollLeft = content.clientWidth;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
(0,
|
|
52
|
+
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
51
53
|
scrollToEnd();
|
|
52
54
|
}, [value]);
|
|
53
55
|
(0, _react.useEffect)(() => {
|
|
@@ -12,7 +12,7 @@ const defaultRoot = _canUseDom.canUseDom ? window : undefined;
|
|
|
12
12
|
|
|
13
13
|
function isElement(node) {
|
|
14
14
|
const ELEMENT_NODE_TYPE = 1;
|
|
15
|
-
return node.
|
|
15
|
+
return node.nodeType === ELEMENT_NODE_TYPE;
|
|
16
16
|
} // https://github.com/youzan/vant/issues/3823
|
|
17
17
|
|
|
18
18
|
|
package/cjs/utils/is-dev.js
CHANGED
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
function useRefState(initialState) {
|
|
11
11
|
const [state, setState] = (0, _react.useState)(initialState);
|
|
12
12
|
const ref = (0, _react.useRef)(state);
|
|
13
|
-
(0, _react.
|
|
13
|
+
(0, _react.useEffect)(() => {
|
|
14
14
|
ref.current = state;
|
|
15
15
|
}, [state]);
|
|
16
16
|
return [state, setState, ref];
|
|
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useResizeEffect = useResizeEffect;
|
|
7
7
|
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _ahooks = require("ahooks");
|
|
11
9
|
|
|
12
10
|
function useResizeEffect(effect, targetRef) {
|
|
13
11
|
const fn = (0, _ahooks.useMemoizedFn)(effect);
|
|
14
|
-
(0,
|
|
12
|
+
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
15
13
|
const target = targetRef.current;
|
|
16
14
|
if (!target) return;
|
|
17
15
|
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useTabListScroll = void 0;
|
|
7
7
|
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _web = require("@react-spring/web");
|
|
11
9
|
|
|
12
10
|
var _useMutationEffect = require("./use-mutation-effect");
|
|
@@ -49,7 +47,7 @@ const useTabListScroll = (targetRef, activeIndex) => {
|
|
|
49
47
|
});
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
(0,
|
|
50
|
+
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
53
51
|
animate(true);
|
|
54
52
|
}, []);
|
|
55
53
|
(0, _ahooks.useUpdateLayoutEffect)(() => {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
display: inline-block;
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
height: auto;
|
|
15
|
-
padding:
|
|
15
|
+
padding: 7px 12px;
|
|
16
16
|
margin: 0;
|
|
17
|
-
font-size:
|
|
17
|
+
font-size: 17px;
|
|
18
18
|
line-height: 1.4;
|
|
19
19
|
text-align: center;
|
|
20
20
|
border: var(--border-width) var(--border-style) var(--border-color);
|
|
@@ -3,6 +3,7 @@ import { NativeProps } from '../../utils/native-props';
|
|
|
3
3
|
export declare type CalendarProps = {
|
|
4
4
|
weekStartsOn?: 'Monday' | 'Sunday';
|
|
5
5
|
renderLabel?: (date: Date) => string | null | undefined;
|
|
6
|
+
onPageChange?: (year: number, month: number) => void;
|
|
6
7
|
} & ({
|
|
7
8
|
selectionMode?: undefined;
|
|
8
9
|
value?: undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useMemo, useState } from 'react';
|
|
2
2
|
import { withNativeProps } from '../../utils/native-props';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -7,6 +7,7 @@ import { ArrowLeft } from './arrow-left';
|
|
|
7
7
|
import { ArrowLeftDouble } from './arrow-left-double';
|
|
8
8
|
import { useConfig } from '../config-provider';
|
|
9
9
|
import isoWeek from 'dayjs/plugin/isoWeek';
|
|
10
|
+
import { useIsomorphicLayoutEffect, useUpdateEffect } from 'ahooks';
|
|
10
11
|
dayjs.extend(isoWeek);
|
|
11
12
|
const classPrefix = 'adm-calendar';
|
|
12
13
|
const defaultProps = {
|
|
@@ -26,6 +27,11 @@ export const Calendar = p => {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
const [current, setCurrent] = useState(() => dayjs().date(1));
|
|
30
|
+
useUpdateEffect(() => {
|
|
31
|
+
var _a;
|
|
32
|
+
|
|
33
|
+
(_a = props.onPageChange) === null || _a === void 0 ? void 0 : _a.call(props, current.year(), current.month() + 1);
|
|
34
|
+
}, [current]);
|
|
29
35
|
const header = React.createElement("div", {
|
|
30
36
|
className: `${classPrefix}-header`
|
|
31
37
|
}, React.createElement("a", {
|
|
@@ -65,7 +71,7 @@ export const Calendar = p => {
|
|
|
65
71
|
}, [props.selectionMode, props.value, props.defaultValue]);
|
|
66
72
|
const [begin, setBegin] = useState(null);
|
|
67
73
|
const [end, setEnd] = useState(null);
|
|
68
|
-
|
|
74
|
+
useIsomorphicLayoutEffect(() => {
|
|
69
75
|
setBegin(dateRange[0] ? dayjs(dateRange[0]) : null);
|
|
70
76
|
setEnd(dateRange[1] ? dayjs(dateRange[1]) : null);
|
|
71
77
|
}, [dateRange[0], dateRange[1]]);
|
|
@@ -7,6 +7,7 @@ import { mergeProps } from '../../utils/with-default-props';
|
|
|
7
7
|
import { devWarning } from '../../utils/dev-log';
|
|
8
8
|
import { CheckIcon } from './check-icon';
|
|
9
9
|
import { IndeterminateIcon } from './indeterminate-icon';
|
|
10
|
+
import { isDev } from '../../utils/is-dev';
|
|
10
11
|
const classPrefix = `adm-checkbox`;
|
|
11
12
|
const defaultProps = {
|
|
12
13
|
defaultChecked: false,
|
|
@@ -21,23 +22,21 @@ export const Checkbox = p => {
|
|
|
21
22
|
onChange: props.onChange
|
|
22
23
|
});
|
|
23
24
|
let disabled = props.disabled;
|
|
24
|
-
|
|
25
|
-
const usageWarning = () => {
|
|
26
|
-
if (p.checked !== undefined) {
|
|
27
|
-
devWarning('Checkbox', 'When used with `Checkbox.Group`, the `checked` prop of `Checkbox` will not work if `value` prop of `Checkbox` is not undefined.');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (p.defaultChecked !== undefined) {
|
|
31
|
-
devWarning('Checkbox', 'When used with `Checkbox.Group`, the `defaultChecked` prop of `Checkbox` will not work if `value` prop of `Checkbox` is not undefined.');
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
25
|
const {
|
|
36
26
|
value
|
|
37
27
|
} = props;
|
|
38
28
|
|
|
39
29
|
if (groupContext && value !== undefined) {
|
|
40
|
-
|
|
30
|
+
if (isDev) {
|
|
31
|
+
if (p.checked !== undefined) {
|
|
32
|
+
devWarning('Checkbox', 'When used within `Checkbox.Group`, the `checked` prop of `Checkbox` will not work.');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (p.defaultChecked !== undefined) {
|
|
36
|
+
devWarning('Checkbox', 'When used within `Checkbox.Group`, the `defaultChecked` prop of `Checkbox` will not work.');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
41
40
|
checked = groupContext.value.includes(value);
|
|
42
41
|
|
|
43
42
|
setChecked = checked => {
|
|
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import type { PickerProps } from '../picker';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
import type { Precision, DatePickerFilter } from './date-picker-utils';
|
|
5
|
-
export declare type DatePickerProps = Pick<PickerProps, 'onCancel' | 'onClose' | 'visible' | 'confirmText' | 'cancelText' | 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'title' | 'stopPropagation' | 'style'> & {
|
|
5
|
+
export declare type DatePickerProps = Pick<PickerProps, 'onCancel' | 'onClose' | 'closeOnMaskClick' | 'visible' | 'confirmText' | 'cancelText' | 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'title' | 'stopPropagation' | 'style'> & {
|
|
6
6
|
value?: Date | null;
|
|
7
7
|
defaultValue?: Date | null;
|
|
8
8
|
onSelect?: (value: Date) => void;
|
|
@@ -43,9 +43,6 @@
|
|
|
43
43
|
.adm-dropdown-item-highlight {
|
|
44
44
|
color: var(--adm-color-primary);
|
|
45
45
|
}
|
|
46
|
-
.adm-dropdown-item-active {
|
|
47
|
-
color: var(--adm-color-primary);
|
|
48
|
-
}
|
|
49
46
|
.adm-dropdown-item-active .adm-dropdown-item-title:after {
|
|
50
47
|
margin-top: -1px;
|
|
51
48
|
transform: rotate(135deg);
|
|
@@ -6,9 +6,11 @@ import { DownFill } from 'antd-mobile-icons';
|
|
|
6
6
|
const classPrefix = `adm-dropdown-item`;
|
|
7
7
|
|
|
8
8
|
const Item = props => {
|
|
9
|
+
var _a;
|
|
10
|
+
|
|
9
11
|
const cls = classNames(classPrefix, {
|
|
10
12
|
[`${classPrefix}-active`]: props.active,
|
|
11
|
-
[`${classPrefix}-highlight`]: props.highlight
|
|
13
|
+
[`${classPrefix}-highlight`]: (_a = props.highlight) !== null && _a !== void 0 ? _a : props.active
|
|
12
14
|
});
|
|
13
15
|
return withNativeProps(props, React.createElement("div", {
|
|
14
16
|
className: cls,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
2
|
import { mergeProps } from '../../utils/with-default-props';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
4
|
import { useResizeEffect } from '../../utils/use-resize-effect';
|
|
5
|
+
import { useIsomorphicLayoutEffect } from 'ahooks';
|
|
5
6
|
const classPrefix = `adm-ellipsis`;
|
|
6
7
|
const defaultProps = {
|
|
7
8
|
direction: 'end',
|
|
@@ -113,7 +114,7 @@ export const Ellipsis = p => {
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
useResizeEffect(calcEllipsised, rootRef);
|
|
116
|
-
|
|
117
|
+
useIsomorphicLayoutEffect(() => {
|
|
117
118
|
calcEllipsised();
|
|
118
119
|
}, [props.content, props.direction, props.rows, props.expandText, props.collapseText]);
|
|
119
120
|
const expandActionElement = exceeded && props.expandText ? React.createElement("a", {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
-
export declare type FloatingPanelProps = {
|
|
4
|
-
anchors: number[];
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
onHeightChange?: (height: number, animating: boolean) => void;
|
|
7
|
-
} & NativeProps<'--border-radius' | '--z-index'>;
|
|
8
3
|
export declare type FloatingPanelRef = {
|
|
9
4
|
setHeight: (height: number, options?: {
|
|
10
5
|
immediate?: boolean;
|
|
11
6
|
}) => void;
|
|
12
7
|
};
|
|
8
|
+
export declare type FloatingPanelProps = {
|
|
9
|
+
anchors: number[];
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
onHeightChange?: (height: number, animating: boolean) => void;
|
|
12
|
+
handleDraggingOfContent?: boolean;
|
|
13
|
+
} & NativeProps<'--border-radius' | '--z-index'>;
|
|
13
14
|
export declare const FloatingPanel: React.ForwardRefExoticComponent<{
|
|
14
15
|
anchors: number[];
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
onHeightChange?: ((height: number, animating: boolean) => void) | undefined;
|
|
18
|
+
handleDraggingOfContent?: boolean | undefined;
|
|
17
19
|
} & NativeProps<"--z-index" | "--border-radius"> & React.RefAttributes<FloatingPanelRef>>;
|
|
@@ -4,9 +4,15 @@ import { useDrag } from '@use-gesture/react';
|
|
|
4
4
|
import { useSpring, animated } from '@react-spring/web';
|
|
5
5
|
import { supportsPassive } from '../../utils/supports-passive';
|
|
6
6
|
import { nearest } from '../../utils/nearest';
|
|
7
|
-
|
|
7
|
+
import { mergeProps } from '../../utils/with-default-props';
|
|
8
|
+
import { useLockScroll } from '../../utils/use-lock-scroll';
|
|
9
|
+
const defaultProps = {
|
|
10
|
+
handleDraggingOfContent: true
|
|
11
|
+
};
|
|
12
|
+
export const FloatingPanel = forwardRef((p, ref) => {
|
|
8
13
|
var _a;
|
|
9
14
|
|
|
15
|
+
const props = mergeProps(defaultProps, p);
|
|
10
16
|
const {
|
|
11
17
|
anchors
|
|
12
18
|
} = props;
|
|
@@ -44,6 +50,7 @@ export const FloatingPanel = forwardRef((props, ref) => {
|
|
|
44
50
|
if (header === target || (header === null || header === void 0 ? void 0 : header.contains(target))) {
|
|
45
51
|
pullingRef.current = true;
|
|
46
52
|
} else {
|
|
53
|
+
if (!props.handleDraggingOfContent) return;
|
|
47
54
|
const reachedTop = y.goal <= bounds.top;
|
|
48
55
|
const content = contentRef.current;
|
|
49
56
|
if (!content) return;
|
|
@@ -101,6 +108,7 @@ export const FloatingPanel = forwardRef((props, ref) => {
|
|
|
101
108
|
});
|
|
102
109
|
}
|
|
103
110
|
}), [api]);
|
|
111
|
+
useLockScroll(elementRef, true);
|
|
104
112
|
return withNativeProps(props, React.createElement(animated.div, {
|
|
105
113
|
ref: elementRef,
|
|
106
114
|
className: 'adm-floating-panel',
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
line-height: 1.5;
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
position: relative;
|
|
10
|
+
color: #666666;
|
|
10
11
|
}
|
|
11
12
|
.adm-form-item-label-required {
|
|
12
13
|
position: absolute;
|
|
@@ -16,23 +17,28 @@
|
|
|
16
17
|
color: var(--adm-color-danger);
|
|
17
18
|
user-select: none;
|
|
18
19
|
}
|
|
20
|
+
.adm-form-item-label-help {
|
|
21
|
+
margin-left: 4px;
|
|
22
|
+
}
|
|
19
23
|
.adm-form-item-footer {
|
|
20
24
|
color: var(--adm-color-danger);
|
|
25
|
+
margin-top: 4px;
|
|
21
26
|
}
|
|
22
27
|
.adm-form-item.adm-form-item-hidden {
|
|
23
28
|
display: none;
|
|
24
29
|
}
|
|
25
|
-
.adm-form-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
.adm-form-vertical .adm-form-item-footer {
|
|
30
|
-
margin-top: 4px;
|
|
30
|
+
.adm-form-item.adm-form-item-horizontal.adm-list-item {
|
|
31
|
+
--align-items: stretch;
|
|
32
|
+
--prefix-width: 6em;
|
|
31
33
|
}
|
|
32
|
-
.adm-form-horizontal .adm-list-item-content-prefix {
|
|
34
|
+
.adm-form-item.adm-form-item-horizontal .adm-list-item-content-prefix {
|
|
33
35
|
padding-top: 12px;
|
|
34
36
|
padding-bottom: 12px;
|
|
35
37
|
}
|
|
36
|
-
.adm-form-item-
|
|
37
|
-
|
|
38
|
+
.adm-form-item.adm-form-item-horizontal .adm-list-item-content-extra {
|
|
39
|
+
align-self: center;
|
|
40
|
+
}
|
|
41
|
+
.adm-form-item.adm-form-item-vertical .adm-form-item-label {
|
|
42
|
+
font-size: 15px;
|
|
43
|
+
margin-bottom: 4px;
|
|
38
44
|
}
|
|
@@ -7,7 +7,7 @@ import type { FormLayout } from './index';
|
|
|
7
7
|
declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
|
8
8
|
declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
|
|
9
9
|
declare type RcFieldProps = Omit<FieldProps, 'children'>;
|
|
10
|
-
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow'> & {
|
|
10
|
+
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow' | 'description'> & {
|
|
11
11
|
label?: React.ReactNode;
|
|
12
12
|
help?: React.ReactNode;
|
|
13
13
|
hasFeedback?: boolean;
|
|
@@ -7,6 +7,8 @@ import { devWarning } from '../../utils/dev-log';
|
|
|
7
7
|
import { FormContext, NoStyleItemContext } from './context';
|
|
8
8
|
import { toArray } from './utils';
|
|
9
9
|
import List from '../list';
|
|
10
|
+
import Popover from '../popover';
|
|
11
|
+
import { QuestionCircleOutline } from 'antd-mobile-icons';
|
|
10
12
|
const NAME_SPLIT = '__SPLIT__';
|
|
11
13
|
const classPrefix = `adm-form-item`;
|
|
12
14
|
const MemoInput = React.memo(({
|
|
@@ -26,7 +28,8 @@ const FormItemLayout = props => {
|
|
|
26
28
|
htmlFor,
|
|
27
29
|
hidden,
|
|
28
30
|
errors,
|
|
29
|
-
arrow
|
|
31
|
+
arrow,
|
|
32
|
+
description
|
|
30
33
|
} = props;
|
|
31
34
|
const context = useContext(FormContext);
|
|
32
35
|
const hasFeedback = props.hasFeedback !== undefined ? props.hasFeedback : context.hasFeedback;
|
|
@@ -39,17 +42,21 @@ const FormItemLayout = props => {
|
|
|
39
42
|
className: `${classPrefix}-label-required`
|
|
40
43
|
}, "*"), help && React.createElement("span", {
|
|
41
44
|
className: `${classPrefix}-label-help`
|
|
42
|
-
},
|
|
43
|
-
|
|
45
|
+
}, React.createElement(Popover, {
|
|
46
|
+
content: help,
|
|
47
|
+
mode: 'dark',
|
|
48
|
+
trigger: 'click'
|
|
49
|
+
}, React.createElement(QuestionCircleOutline, null)))) : null;
|
|
50
|
+
const descriptionElement = feedback || description ? React.createElement(React.Fragment, null, description, React.createElement("div", {
|
|
44
51
|
className: `${classPrefix}-footer`
|
|
45
|
-
}, feedback);
|
|
52
|
+
}, feedback)) : null;
|
|
46
53
|
return React.createElement(List.Item, {
|
|
47
54
|
style: style,
|
|
48
55
|
title: layout === 'vertical' && labelElement,
|
|
49
56
|
prefix: layout === 'horizontal' && labelElement,
|
|
50
57
|
extra: extra,
|
|
51
58
|
description: descriptionElement,
|
|
52
|
-
className: classNames(classPrefix, className, {
|
|
59
|
+
className: classNames(classPrefix, className, `${classPrefix}-${layout}`, {
|
|
53
60
|
[`${classPrefix}-hidden`]: hidden
|
|
54
61
|
}),
|
|
55
62
|
disabled: disabled,
|
|
@@ -73,6 +80,7 @@ export const FormItem = props => {
|
|
|
73
80
|
noStyle,
|
|
74
81
|
hidden,
|
|
75
82
|
layout,
|
|
83
|
+
description,
|
|
76
84
|
// Field 相关
|
|
77
85
|
disabled,
|
|
78
86
|
rules,
|
|
@@ -85,7 +93,7 @@ export const FormItem = props => {
|
|
|
85
93
|
dependencies,
|
|
86
94
|
arrow
|
|
87
95
|
} = props,
|
|
88
|
-
fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
|
|
96
|
+
fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
|
|
89
97
|
|
|
90
98
|
const {
|
|
91
99
|
validateTrigger: contextValidateTrigger
|
|
@@ -134,6 +142,7 @@ export const FormItem = props => {
|
|
|
134
142
|
label: label,
|
|
135
143
|
extra: extra,
|
|
136
144
|
help: help,
|
|
145
|
+
description: description,
|
|
137
146
|
required: isRequired,
|
|
138
147
|
disabled: disabled,
|
|
139
148
|
hasFeedback: hasFeedback,
|
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
--padding-left: 16px;
|
|
3
3
|
--padding-right: 12px;
|
|
4
4
|
}
|
|
5
|
-
.adm-form-horizontal .adm-list.adm-list {
|
|
6
|
-
--prefix-width: 6em;
|
|
7
|
-
--align-items: stretch;
|
|
8
|
-
}
|
|
9
|
-
.adm-form-horizontal .adm-list.adm-list .adm-list-item-content-extra {
|
|
10
|
-
align-self: center;
|
|
11
|
-
}
|
|
12
5
|
.adm-form .adm-form-footer {
|
|
13
6
|
padding: 20px 12px;
|
|
14
7
|
}
|
|
@@ -51,7 +51,7 @@ export const Form = forwardRef((p, ref) => {
|
|
|
51
51
|
});
|
|
52
52
|
collect();
|
|
53
53
|
return React.createElement(RcForm, Object.assign({
|
|
54
|
-
className: classNames(classPrefix,
|
|
54
|
+
className: classNames(classPrefix, className),
|
|
55
55
|
style: style,
|
|
56
56
|
ref: ref
|
|
57
57
|
}, formProps), React.createElement(FormContext.Provider, {
|
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
--padding-left: 16px;
|
|
3
3
|
--padding-right: 12px;
|
|
4
4
|
}
|
|
5
|
-
.adm-form-horizontal .adm-list.adm-list {
|
|
6
|
-
--prefix-width: 6em;
|
|
7
|
-
--align-items: stretch;
|
|
8
|
-
}
|
|
9
|
-
.adm-form-horizontal .adm-list.adm-list .adm-list-item-content-extra {
|
|
10
|
-
align-self: center;
|
|
11
|
-
}
|
|
12
5
|
.adm-form .adm-form-footer {
|
|
13
6
|
padding: 20px 12px;
|
|
14
7
|
}
|
|
@@ -21,6 +14,7 @@
|
|
|
21
14
|
line-height: 1.5;
|
|
22
15
|
box-sizing: border-box;
|
|
23
16
|
position: relative;
|
|
17
|
+
color: #666666;
|
|
24
18
|
}
|
|
25
19
|
.adm-form-item-label-required {
|
|
26
20
|
position: absolute;
|
|
@@ -30,23 +24,28 @@
|
|
|
30
24
|
color: var(--adm-color-danger);
|
|
31
25
|
user-select: none;
|
|
32
26
|
}
|
|
27
|
+
.adm-form-item-label-help {
|
|
28
|
+
margin-left: 4px;
|
|
29
|
+
}
|
|
33
30
|
.adm-form-item-footer {
|
|
34
31
|
color: var(--adm-color-danger);
|
|
32
|
+
margin-top: 4px;
|
|
35
33
|
}
|
|
36
34
|
.adm-form-item.adm-form-item-hidden {
|
|
37
35
|
display: none;
|
|
38
36
|
}
|
|
39
|
-
.adm-form-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
.adm-form-vertical .adm-form-item-footer {
|
|
44
|
-
margin-top: 4px;
|
|
37
|
+
.adm-form-item.adm-form-item-horizontal.adm-list-item {
|
|
38
|
+
--align-items: stretch;
|
|
39
|
+
--prefix-width: 6em;
|
|
45
40
|
}
|
|
46
|
-
.adm-form-horizontal .adm-list-item-content-prefix {
|
|
41
|
+
.adm-form-item.adm-form-item-horizontal .adm-list-item-content-prefix {
|
|
47
42
|
padding-top: 12px;
|
|
48
43
|
padding-bottom: 12px;
|
|
49
44
|
}
|
|
50
|
-
.adm-form-item-
|
|
51
|
-
|
|
45
|
+
.adm-form-item.adm-form-item-horizontal .adm-list-item-content-extra {
|
|
46
|
+
align-self: center;
|
|
47
|
+
}
|
|
48
|
+
.adm-form-item.adm-form-item-vertical .adm-form-item-label {
|
|
49
|
+
font-size: 15px;
|
|
50
|
+
margin-bottom: 4px;
|
|
52
51
|
}
|
|
@@ -19,7 +19,7 @@ export declare type ImageUploaderProps = {
|
|
|
19
19
|
showUpload?: boolean;
|
|
20
20
|
deletable?: boolean;
|
|
21
21
|
capture?: InputHTMLAttributes<unknown>['capture'];
|
|
22
|
-
onPreview?: (index: number) => void;
|
|
22
|
+
onPreview?: (index: number, item: ImageUploadItem) => void;
|
|
23
23
|
beforeUpload?: (file: File[]) => Promise<File[]> | File[];
|
|
24
24
|
upload: (file: File) => Promise<ImageUploadItem>;
|
|
25
25
|
onDelete?: (item: ImageUploadItem) => boolean | Promise<boolean> | void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useRef, useState } from 'react';
|
|
3
3
|
import { AddOutline } from 'antd-mobile-icons';
|
|
4
4
|
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 { useMemoizedFn, useUnmount } from 'ahooks';
|
|
8
|
+
import { useIsomorphicLayoutEffect, useMemoizedFn, useUnmount } from 'ahooks';
|
|
9
9
|
import Space from '../space';
|
|
10
10
|
import { withNativeProps } from '../../utils/native-props';
|
|
11
11
|
const classPrefix = `adm-image-uploader`;
|
|
@@ -26,7 +26,7 @@ export const ImageUploader = p => {
|
|
|
26
26
|
setValue(updater(value));
|
|
27
27
|
});
|
|
28
28
|
const [tasks, setTasks] = useState([]);
|
|
29
|
-
|
|
29
|
+
useIsomorphicLayoutEffect(() => {
|
|
30
30
|
setTasks(prev => prev.filter(task => {
|
|
31
31
|
if (task.url === undefined) return true;
|
|
32
32
|
return !value.some(fileItem => fileItem.url === task.url);
|
|
@@ -144,7 +144,7 @@ export const ImageUploader = p => {
|
|
|
144
144
|
previewImage(index);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
onPreview && onPreview(index);
|
|
147
|
+
onPreview && onPreview(index, fileItem);
|
|
148
148
|
},
|
|
149
149
|
onDelete: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
150
150
|
var _c;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
position: relative;
|
|
11
11
|
z-index: 1;
|
|
12
12
|
cursor: grab;
|
|
13
|
+
touch-action: none;
|
|
13
14
|
}
|
|
14
15
|
.adm-image-viewer-slides-inner {
|
|
15
16
|
height: 100%;
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
width: 100%;
|
|
33
34
|
height: 100%;
|
|
34
35
|
cursor: grab;
|
|
36
|
+
touch-action: none;
|
|
35
37
|
}
|
|
36
38
|
.adm-image-viewer-image-wrapper {
|
|
37
39
|
width: 100%;
|