antd-mobile 5.27.0 → 5.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2x/README.md +1 -1
- package/2x/bundle/antd-mobile.cjs.development.js +473 -777
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +473 -777
- package/2x/bundle/antd-mobile.es.js +7227 -7550
- package/2x/bundle/antd-mobile.umd.development.js +469 -773
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/css-vars-patch.css +4 -0
- package/2x/cjs/components/calendar/calendar.d.ts +1 -0
- package/2x/cjs/components/calendar/calendar.js +1 -1
- package/2x/cjs/components/cascader/cascader.patch.css +3 -0
- package/2x/cjs/components/footer/footer.js +3 -3
- package/2x/cjs/components/input/input.js +1 -0
- package/2x/cjs/components/swiper/index.d.ts +1 -0
- package/2x/cjs/components/swiper/swiper.d.ts +9 -0
- package/2x/cjs/components/swiper/swiper.js +18 -2
- package/2x/cjs/global/css-vars-patch.css +4 -0
- package/2x/cjs/utils/with-func-props.d.ts +5 -0
- package/2x/cjs/utils/with-func-props.js +25 -0
- package/2x/es/components/calendar/calendar.d.ts +1 -0
- package/2x/es/components/calendar/calendar.js +1 -1
- package/2x/es/components/cascader/cascader.patch.css +3 -0
- package/2x/es/components/footer/footer.js +1 -1
- package/2x/es/components/input/input.js +1 -0
- package/2x/es/components/swiper/index.d.ts +1 -0
- package/2x/es/components/swiper/swiper.d.ts +9 -0
- package/2x/es/components/swiper/swiper.js +18 -2
- package/2x/es/global/css-vars-patch.css +4 -0
- package/2x/es/utils/with-func-props.d.ts +5 -0
- package/2x/es/utils/with-func-props.js +19 -0
- package/2x/package.json +1 -1
- package/README.md +1 -1
- package/bundle/antd-mobile.cjs.development.js +473 -777
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +473 -777
- package/bundle/antd-mobile.es.js +7227 -7550
- package/bundle/antd-mobile.umd.development.js +469 -773
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/css-vars-patch.css +3 -0
- package/cjs/components/calendar/calendar.d.ts +1 -0
- package/cjs/components/calendar/calendar.js +1 -1
- package/cjs/components/cascader/cascader.patch.css +3 -0
- package/cjs/components/footer/footer.js +3 -3
- package/cjs/components/input/input.js +1 -0
- package/cjs/components/swiper/index.d.ts +1 -0
- package/cjs/components/swiper/swiper.d.ts +9 -0
- package/cjs/components/swiper/swiper.js +18 -2
- package/cjs/global/css-vars-patch.css +3 -0
- package/cjs/utils/with-func-props.d.ts +5 -0
- package/cjs/utils/with-func-props.js +25 -0
- package/es/components/calendar/calendar.d.ts +1 -0
- package/es/components/calendar/calendar.js +1 -1
- package/es/components/cascader/cascader.patch.css +3 -0
- package/es/components/footer/footer.js +1 -1
- package/es/components/input/input.js +1 -0
- package/es/components/swiper/index.d.ts +1 -0
- package/es/components/swiper/swiper.d.ts +9 -0
- package/es/components/swiper/swiper.js +18 -2
- package/es/global/css-vars-patch.css +3 -0
- package/es/utils/with-func-props.d.ts +5 -0
- package/es/utils/with-func-props.js +19 -0
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -13,6 +13,7 @@ export declare type CalendarProps = {
|
|
|
13
13
|
onPageChange?: (year: number, month: number) => void;
|
|
14
14
|
weekStartsOn?: 'Monday' | 'Sunday';
|
|
15
15
|
renderLabel?: (date: Date) => React.ReactNode;
|
|
16
|
+
renderDate?: (date: Date) => React.ReactNode;
|
|
16
17
|
allowClear?: boolean;
|
|
17
18
|
max?: Date;
|
|
18
19
|
min?: Date;
|
|
@@ -197,7 +197,7 @@ const Calendar = (0, _react.forwardRef)((p, ref) => {
|
|
|
197
197
|
}
|
|
198
198
|
}, _react.default.createElement("div", {
|
|
199
199
|
className: `${classPrefix}-cell-top`
|
|
200
|
-
}, d.date()), _react.default.createElement("div", {
|
|
200
|
+
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), _react.default.createElement("div", {
|
|
201
201
|
className: `${classPrefix}-cell-bottom`
|
|
202
202
|
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate()))));
|
|
203
203
|
iterator = iterator.add(1, 'day');
|
|
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _nativeProps = require("../../utils/native-props");
|
|
10
10
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
11
|
-
var _divider = require("../divider
|
|
11
|
+
var _divider = _interopRequireDefault(require("../divider"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
const classPrefix = `adm-footer`;
|
|
14
14
|
const defaultProps = {
|
|
@@ -42,7 +42,7 @@ const Footer = p => {
|
|
|
42
42
|
className: (0, _classnames.default)(classPrefix)
|
|
43
43
|
}, label && _react.default.createElement("div", {
|
|
44
44
|
className: `${classPrefix}-label`
|
|
45
|
-
}, _react.default.createElement(_divider.
|
|
45
|
+
}, _react.default.createElement(_divider.default, null, label)), links && links.length > 0 && _react.default.createElement("div", {
|
|
46
46
|
className: `${classPrefix}-links`
|
|
47
47
|
}, links.map((link, index) => {
|
|
48
48
|
return _react.default.createElement(_react.default.Fragment, {
|
|
@@ -51,7 +51,7 @@ const Footer = p => {
|
|
|
51
51
|
href: link.href,
|
|
52
52
|
rel: 'noopener noreferrer',
|
|
53
53
|
onClick: event => clickLinkItem(link, index, event)
|
|
54
|
-
}, link.text), index !== links.length - 1 && _react.default.createElement(_divider.
|
|
54
|
+
}, link.text), index !== links.length - 1 && _react.default.createElement(_divider.default, {
|
|
55
55
|
direction: 'vertical'
|
|
56
56
|
}));
|
|
57
57
|
})), content && _react.default.createElement("div", {
|
|
@@ -129,6 +129,7 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
129
129
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
130
130
|
},
|
|
131
131
|
onClick: props.onClick,
|
|
132
|
+
step: props.step,
|
|
132
133
|
role: props.role,
|
|
133
134
|
"aria-valuenow": props['aria-valuenow'],
|
|
134
135
|
"aria-valuemax": props['aria-valuemax'],
|
|
@@ -14,6 +14,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
14
14
|
trackOffset?: number | undefined;
|
|
15
15
|
stuckAtBoundary?: boolean | undefined;
|
|
16
16
|
rubberband?: boolean | undefined;
|
|
17
|
+
stopPropagation?: ("mousedown" | "mousemove" | "mouseup")[] | undefined;
|
|
17
18
|
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
18
19
|
} & {
|
|
19
20
|
className?: string | undefined;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React, { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { PageIndicatorProps } from '../page-indicator';
|
|
4
|
+
declare const eventToPropRecord: {
|
|
5
|
+
readonly mousedown: "onMouseDown";
|
|
6
|
+
readonly mousemove: "onMouseMove";
|
|
7
|
+
readonly mouseup: "onMouseUp";
|
|
8
|
+
};
|
|
9
|
+
declare type PropagationEvent = keyof typeof eventToPropRecord;
|
|
4
10
|
export declare type SwiperRef = {
|
|
5
11
|
swipeTo: (index: number) => void;
|
|
6
12
|
swipeNext: () => void;
|
|
@@ -20,6 +26,7 @@ export declare type SwiperProps = {
|
|
|
20
26
|
trackOffset?: number;
|
|
21
27
|
stuckAtBoundary?: boolean;
|
|
22
28
|
rubberband?: boolean;
|
|
29
|
+
stopPropagation?: PropagationEvent[];
|
|
23
30
|
children?: ReactElement | ReactElement[];
|
|
24
31
|
} & NativeProps<'--height' | '--width' | '--border-radius' | '--track-padding'>;
|
|
25
32
|
export declare const Swiper: React.ForwardRefExoticComponent<{
|
|
@@ -36,9 +43,11 @@ export declare const Swiper: React.ForwardRefExoticComponent<{
|
|
|
36
43
|
trackOffset?: number | undefined;
|
|
37
44
|
stuckAtBoundary?: boolean | undefined;
|
|
38
45
|
rubberband?: boolean | undefined;
|
|
46
|
+
stopPropagation?: ("mousedown" | "mousemove" | "mouseup")[] | undefined;
|
|
39
47
|
children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
|
|
40
48
|
} & {
|
|
41
49
|
className?: string | undefined;
|
|
42
50
|
style?: (React.CSSProperties & Partial<Record<"--width" | "--height" | "--border-radius" | "--track-padding", string>>) | undefined;
|
|
43
51
|
tabIndex?: number | undefined;
|
|
44
52
|
} & React.AriaAttributes & React.RefAttributes<SwiperRef>>;
|
|
53
|
+
export {};
|
|
@@ -17,10 +17,16 @@ var _stagedComponents = require("staged-components");
|
|
|
17
17
|
var _useRefState = require("../../utils/use-ref-state");
|
|
18
18
|
var _bound = require("../../utils/bound");
|
|
19
19
|
var _ahooks = require("ahooks");
|
|
20
|
+
var _withFuncProps = require("../../utils/with-func-props");
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
22
|
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); }
|
|
22
23
|
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; }
|
|
23
24
|
const classPrefix = `adm-swiper`;
|
|
25
|
+
const eventToPropRecord = {
|
|
26
|
+
'mousedown': 'onMouseDown',
|
|
27
|
+
'mousemove': 'onMouseMove',
|
|
28
|
+
'mouseup': 'onMouseUp'
|
|
29
|
+
};
|
|
24
30
|
const defaultProps = {
|
|
25
31
|
defaultIndex: 0,
|
|
26
32
|
allowTouchMove: true,
|
|
@@ -31,7 +37,8 @@ const defaultProps = {
|
|
|
31
37
|
slideSize: 100,
|
|
32
38
|
trackOffset: 0,
|
|
33
39
|
stuckAtBoundary: true,
|
|
34
|
-
rubberband: true
|
|
40
|
+
rubberband: true,
|
|
41
|
+
stopPropagation: []
|
|
35
42
|
};
|
|
36
43
|
let currentUid;
|
|
37
44
|
const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) => {
|
|
@@ -248,6 +255,15 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
248
255
|
'--slide-size': `${props.slideSize}%`,
|
|
249
256
|
'--track-offset': `${props.trackOffset}%`
|
|
250
257
|
};
|
|
258
|
+
const dragProps = Object.assign({}, props.allowTouchMove ? bind() : {});
|
|
259
|
+
const stopPropagationProps = {};
|
|
260
|
+
for (const key of props.stopPropagation) {
|
|
261
|
+
const prop = eventToPropRecord[key];
|
|
262
|
+
stopPropagationProps[prop] = function (e) {
|
|
263
|
+
e.stopPropagation();
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
const mergedProps = (0, _withFuncProps.mergeFuncProps)(dragProps, stopPropagationProps);
|
|
251
267
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
252
268
|
className: (0, _classnames.default)(classPrefix, `${classPrefix}-${props.direction}`),
|
|
253
269
|
style: style
|
|
@@ -262,7 +278,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
|
|
|
262
278
|
}
|
|
263
279
|
forceCancelDrag();
|
|
264
280
|
}
|
|
265
|
-
},
|
|
281
|
+
}, mergedProps), renderTrackInner()), props.indicator === undefined ? _react.default.createElement("div", {
|
|
266
282
|
className: `${classPrefix}-indicator`
|
|
267
283
|
}, _react.default.createElement(_pageIndicator.default, Object.assign({}, props.indicatorProps, {
|
|
268
284
|
total: count,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mergeFuncProps = mergeFuncProps;
|
|
7
|
+
function mergeFuncProps(p1, p2) {
|
|
8
|
+
const p1Keys = Object.keys(p1);
|
|
9
|
+
const p2Keys = Object.keys(p2);
|
|
10
|
+
const keys = new Set([...p1Keys, ...p2Keys]);
|
|
11
|
+
const res = {};
|
|
12
|
+
keys.forEach(key => {
|
|
13
|
+
const p1Value = p1[key];
|
|
14
|
+
const p2Value = p2[key];
|
|
15
|
+
if (typeof p1Value === 'function' && typeof p2Value === 'function') {
|
|
16
|
+
res[key] = function (...args) {
|
|
17
|
+
p1Value(...args);
|
|
18
|
+
p2Value(...args);
|
|
19
|
+
};
|
|
20
|
+
} else {
|
|
21
|
+
res[key] = p1Value || p2Value;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return res;
|
|
25
|
+
}
|
|
@@ -13,6 +13,7 @@ export declare type CalendarProps = {
|
|
|
13
13
|
onPageChange?: (year: number, month: number) => void;
|
|
14
14
|
weekStartsOn?: 'Monday' | 'Sunday';
|
|
15
15
|
renderLabel?: (date: Date) => React.ReactNode;
|
|
16
|
+
renderDate?: (date: Date) => React.ReactNode;
|
|
16
17
|
allowClear?: boolean;
|
|
17
18
|
max?: Date;
|
|
18
19
|
min?: Date;
|
|
@@ -188,7 +188,7 @@ export const Calendar = forwardRef((p, ref) => {
|
|
|
188
188
|
}
|
|
189
189
|
}, React.createElement("div", {
|
|
190
190
|
className: `${classPrefix}-cell-top`
|
|
191
|
-
}, d.date()), React.createElement("div", {
|
|
191
|
+
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React.createElement("div", {
|
|
192
192
|
className: `${classPrefix}-cell-bottom`
|
|
193
193
|
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate()))));
|
|
194
194
|
iterator = iterator.add(1, 'day');
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
4
|
import { mergeProps } from '../../utils/with-default-props';
|
|
5
|
-
import
|
|
5
|
+
import Divider from '../divider';
|
|
6
6
|
const classPrefix = `adm-footer`;
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
label: '',
|
|
@@ -120,6 +120,7 @@ export const Input = forwardRef((p, ref) => {
|
|
|
120
120
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
121
121
|
},
|
|
122
122
|
onClick: props.onClick,
|
|
123
|
+
step: props.step,
|
|
123
124
|
role: props.role,
|
|
124
125
|
"aria-valuenow": props['aria-valuenow'],
|
|
125
126
|
"aria-valuemax": props['aria-valuemax'],
|
|
@@ -14,6 +14,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
14
14
|
trackOffset?: number | undefined;
|
|
15
15
|
stuckAtBoundary?: boolean | undefined;
|
|
16
16
|
rubberband?: boolean | undefined;
|
|
17
|
+
stopPropagation?: ("mousedown" | "mousemove" | "mouseup")[] | undefined;
|
|
17
18
|
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
18
19
|
} & {
|
|
19
20
|
className?: string | undefined;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React, { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { PageIndicatorProps } from '../page-indicator';
|
|
4
|
+
declare const eventToPropRecord: {
|
|
5
|
+
readonly mousedown: "onMouseDown";
|
|
6
|
+
readonly mousemove: "onMouseMove";
|
|
7
|
+
readonly mouseup: "onMouseUp";
|
|
8
|
+
};
|
|
9
|
+
declare type PropagationEvent = keyof typeof eventToPropRecord;
|
|
4
10
|
export declare type SwiperRef = {
|
|
5
11
|
swipeTo: (index: number) => void;
|
|
6
12
|
swipeNext: () => void;
|
|
@@ -20,6 +26,7 @@ export declare type SwiperProps = {
|
|
|
20
26
|
trackOffset?: number;
|
|
21
27
|
stuckAtBoundary?: boolean;
|
|
22
28
|
rubberband?: boolean;
|
|
29
|
+
stopPropagation?: PropagationEvent[];
|
|
23
30
|
children?: ReactElement | ReactElement[];
|
|
24
31
|
} & NativeProps<'--height' | '--width' | '--border-radius' | '--track-padding'>;
|
|
25
32
|
export declare const Swiper: React.ForwardRefExoticComponent<{
|
|
@@ -36,9 +43,11 @@ export declare const Swiper: React.ForwardRefExoticComponent<{
|
|
|
36
43
|
trackOffset?: number | undefined;
|
|
37
44
|
stuckAtBoundary?: boolean | undefined;
|
|
38
45
|
rubberband?: boolean | undefined;
|
|
46
|
+
stopPropagation?: ("mousedown" | "mousemove" | "mouseup")[] | undefined;
|
|
39
47
|
children?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
|
|
40
48
|
} & {
|
|
41
49
|
className?: string | undefined;
|
|
42
50
|
style?: (React.CSSProperties & Partial<Record<"--width" | "--height" | "--border-radius" | "--track-padding", string>>) | undefined;
|
|
43
51
|
tabIndex?: number | undefined;
|
|
44
52
|
} & React.AriaAttributes & React.RefAttributes<SwiperRef>>;
|
|
53
|
+
export {};
|
|
@@ -11,7 +11,13 @@ import { staged } from 'staged-components';
|
|
|
11
11
|
import { useRefState } from '../../utils/use-ref-state';
|
|
12
12
|
import { bound } from '../../utils/bound';
|
|
13
13
|
import { useIsomorphicLayoutEffect, useUpdateEffect } from 'ahooks';
|
|
14
|
+
import { mergeFuncProps } from '../../utils/with-func-props';
|
|
14
15
|
const classPrefix = `adm-swiper`;
|
|
16
|
+
const eventToPropRecord = {
|
|
17
|
+
'mousedown': 'onMouseDown',
|
|
18
|
+
'mousemove': 'onMouseMove',
|
|
19
|
+
'mouseup': 'onMouseUp'
|
|
20
|
+
};
|
|
15
21
|
const defaultProps = {
|
|
16
22
|
defaultIndex: 0,
|
|
17
23
|
allowTouchMove: true,
|
|
@@ -22,7 +28,8 @@ const defaultProps = {
|
|
|
22
28
|
slideSize: 100,
|
|
23
29
|
trackOffset: 0,
|
|
24
30
|
stuckAtBoundary: true,
|
|
25
|
-
rubberband: true
|
|
31
|
+
rubberband: true,
|
|
32
|
+
stopPropagation: []
|
|
26
33
|
};
|
|
27
34
|
let currentUid;
|
|
28
35
|
export const Swiper = forwardRef(staged((p, ref) => {
|
|
@@ -239,6 +246,15 @@ export const Swiper = forwardRef(staged((p, ref) => {
|
|
|
239
246
|
'--slide-size': `${props.slideSize}%`,
|
|
240
247
|
'--track-offset': `${props.trackOffset}%`
|
|
241
248
|
};
|
|
249
|
+
const dragProps = Object.assign({}, props.allowTouchMove ? bind() : {});
|
|
250
|
+
const stopPropagationProps = {};
|
|
251
|
+
for (const key of props.stopPropagation) {
|
|
252
|
+
const prop = eventToPropRecord[key];
|
|
253
|
+
stopPropagationProps[prop] = function (e) {
|
|
254
|
+
e.stopPropagation();
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
const mergedProps = mergeFuncProps(dragProps, stopPropagationProps);
|
|
242
258
|
return withNativeProps(props, React.createElement("div", {
|
|
243
259
|
className: classNames(classPrefix, `${classPrefix}-${props.direction}`),
|
|
244
260
|
style: style
|
|
@@ -253,7 +269,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
|
|
|
253
269
|
}
|
|
254
270
|
forceCancelDrag();
|
|
255
271
|
}
|
|
256
|
-
},
|
|
272
|
+
}, mergedProps), renderTrackInner()), props.indicator === undefined ? React.createElement("div", {
|
|
257
273
|
className: `${classPrefix}-indicator`
|
|
258
274
|
}, React.createElement(PageIndicator, Object.assign({}, props.indicatorProps, {
|
|
259
275
|
total: count,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function mergeFuncProps(p1, p2) {
|
|
2
|
+
const p1Keys = Object.keys(p1);
|
|
3
|
+
const p2Keys = Object.keys(p2);
|
|
4
|
+
const keys = new Set([...p1Keys, ...p2Keys]);
|
|
5
|
+
const res = {};
|
|
6
|
+
keys.forEach(key => {
|
|
7
|
+
const p1Value = p1[key];
|
|
8
|
+
const p2Value = p2[key];
|
|
9
|
+
if (typeof p1Value === 'function' && typeof p2Value === 'function') {
|
|
10
|
+
res[key] = function (...args) {
|
|
11
|
+
p1Value(...args);
|
|
12
|
+
p2Value(...args);
|
|
13
|
+
};
|
|
14
|
+
} else {
|
|
15
|
+
res[key] = p1Value || p2Value;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return res;
|
|
19
|
+
}
|
package/2x/package.json
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Essential UI blocks for building mobile web apps.
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
[](https://www.npmjs.com/package/antd-mobile) [](https://github.com/ant-design/ant-design-mobile/releases) [](https://www.npmjs.com/package/antd-mobile) [](https://www.npmjs.com/package/antd-mobile) [](https://www.jsdelivr.com/package/npm/antd-mobile) [](https://unpkg.com/browse/antd-mobile@5/umd/antd-mobile.js) [](https://github.com/ant-design/ant-design-mobile/graphs/contributors) [](https://github.com/ant-design/ant-design-mobile/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) ](https://img.shields.io/npm/v/antd-mobile)](https://www.npmjs.com/package/antd-mobile) [](https://github.com/ant-design/ant-design-mobile/releases) [](https://www.npmjs.com/package/antd-mobile) [](https://www.npmjs.com/package/antd-mobile) [](https://www.jsdelivr.com/package/npm/antd-mobile) [](https://unpkg.com/browse/antd-mobile@5/umd/antd-mobile.js) [](https://github.com/ant-design/ant-design-mobile/graphs/contributors) [](https://github.com/ant-design/ant-design-mobile/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)  [](https://codecov.io/gh/ant-design/ant-design-mobile) [](https://github.com/ant-design/ant-design-mobile)
|
|
11
11
|
|
|
12
12
|
<h4>
|
|
13
13
|
<a href="https://mobile.ant.design">English Doc</a>
|