pixuireactcomponents 1.4.12 → 1.4.13
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/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import { h } from 'preact';
|
|
|
14
14
|
* @param touchable - 是否允许手势切换
|
|
15
15
|
* @param onSlideChange - 切换元素后的回调函数
|
|
16
16
|
* @param onClick - 点击元素的回调函数
|
|
17
|
-
* @param touchSwitchDistance - 手势切换的距离,一个0-1
|
|
17
|
+
* @param touchSwitchDistance - 手势切换的距离,一个0-1的小数,代表拖动距离占父元素宽度的百分比
|
|
18
18
|
*/
|
|
19
19
|
export declare function Carousel(props: {
|
|
20
20
|
rootId?: string;
|
|
@@ -60,7 +60,7 @@ import { useImperativeHandle, useState, useRef, useMemo, useEffect } from 'preac
|
|
|
60
60
|
* @param touchable - 是否允许手势切换
|
|
61
61
|
* @param onSlideChange - 切换元素后的回调函数
|
|
62
62
|
* @param onClick - 点击元素的回调函数
|
|
63
|
-
* @param touchSwitchDistance - 手势切换的距离,一个0-1
|
|
63
|
+
* @param touchSwitchDistance - 手势切换的距离,一个0-1的小数,代表拖动距离占父元素宽度的百分比
|
|
64
64
|
*/
|
|
65
65
|
export function Carousel(props) {
|
|
66
66
|
var _a = props.rootId, rootId = _a === void 0 ? '' : _a, _b = props.rootClassName, rootClassName = _b === void 0 ? '' : _b, _c = props.children, children = _c === void 0 ? [] : _c, _d = props.defaultIndex, defaultIndex = _d === void 0 ? 1 : _d, _e = props.compWidth, compWidth = _e === void 0 ? 100 : _e, _f = props.compHeight, compHeight = _f === void 0 ? 100 : _f, _g = props.autoplay, autoplay = _g === void 0 ? true : _g, _h = props.switchDuration, switchDuration = _h === void 0 ? 3000 : _h, _j = props.loop, loop = _j === void 0 ? true : _j, _k = props.isVertical, isVertical = _k === void 0 ? false : _k, _l = props.touchable, touchable = _l === void 0 ? true : _l, _m = props.onSlideChange, onSlideChange = _m === void 0 ? null : _m, _o = props.onClick, onClick = _o === void 0 ? null : _o, _p = props.touchSwitchDistance, touchSwitchDistance = _p === void 0 ? props.touchSwitchDistance && props.touchSwitchDistance > 0 && props.touchSwitchDistance < 1
|