mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 09:52:57 +08:00
fix(ImagePreview): missing swipeDuration type definition (#4968)
This commit is contained in:
parent
b055980fe0
commit
f4f88c5254
@ -272,8 +272,8 @@ export default createComponent({
|
|||||||
ref="swipe"
|
ref="swipe"
|
||||||
loop={this.loop}
|
loop={this.loop}
|
||||||
class={bem('swipe')}
|
class={bem('swipe')}
|
||||||
duration={this.swipeDuration}
|
|
||||||
indicatorColor="white"
|
indicatorColor="white"
|
||||||
|
duration={this.swipeDuration}
|
||||||
initialSwipe={this.startPosition}
|
initialSwipe={this.startPosition}
|
||||||
showIndicators={this.showIndicators}
|
showIndicators={this.showIndicators}
|
||||||
onChange={this.setActive}
|
onChange={this.setActive}
|
||||||
|
@ -107,7 +107,7 @@ export default {
|
|||||||
| showIndex | 是否显示页码 | *boolean* | `true` | - |
|
| showIndex | 是否显示页码 | *boolean* | `true` | - |
|
||||||
| showIndicators | 是否显示轮播指示器 | *boolean* | `false` | - |
|
| showIndicators | 是否显示轮播指示器 | *boolean* | `false` | - |
|
||||||
| loop | 是否开启循环播放 | *boolean* | `true` | - |
|
| loop | 是否开启循环播放 | *boolean* | `true` | - |
|
||||||
| swipeDuration | 动画时长,单位为 ms | *number* | `500` | - |
|
| swipeDuration | 动画时长,单位为`ms` | *number* | `500` | - |
|
||||||
| onClose | 关闭时的回调函数 | *Function* | - | - |
|
| onClose | 关闭时的回调函数 | *Function* | - | - |
|
||||||
| onChange | 切换图片时的回调函数,回调参数为当前索引 | *Function* | - | 2.0.3 |
|
| onChange | 切换图片时的回调函数,回调参数为当前索引 | *Function* | - | 2.0.3 |
|
||||||
| asyncClose | 是否开启异步关闭 | *boolean* | `false` | - |
|
| asyncClose | 是否开启异步关闭 | *boolean* | `false` | - |
|
||||||
|
@ -5,9 +5,8 @@ import { isServer } from '../utils';
|
|||||||
let instance;
|
let instance;
|
||||||
|
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
images: [],
|
|
||||||
loop: true,
|
loop: true,
|
||||||
swipeDuration: 500,
|
images: [],
|
||||||
value: true,
|
value: true,
|
||||||
minZoom: 1 / 3,
|
minZoom: 1 / 3,
|
||||||
maxZoom: 3,
|
maxZoom: 3,
|
||||||
@ -18,6 +17,7 @@ const defaultConfig = {
|
|||||||
showIndex: true,
|
showIndex: true,
|
||||||
asyncClose: false,
|
asyncClose: false,
|
||||||
startPosition: 0,
|
startPosition: 0,
|
||||||
|
swipeDuration: 500,
|
||||||
showIndicators: false,
|
showIndicators: false,
|
||||||
closeOnPopstate: false
|
closeOnPopstate: false
|
||||||
};
|
};
|
||||||
|
3
types/image-preview.d.ts
vendored
3
types/image-preview.d.ts
vendored
@ -6,10 +6,11 @@ export type ImagePreviewOptions = string[] | {
|
|||||||
maxZoom?: number;
|
maxZoom?: number;
|
||||||
minZoom?: number;
|
minZoom?: number;
|
||||||
className?: any;
|
className?: any;
|
||||||
startPosition?: number;
|
|
||||||
lazyLoad?: boolean;
|
lazyLoad?: boolean;
|
||||||
showIndex?: boolean;
|
showIndex?: boolean;
|
||||||
asyncClose?: boolean;
|
asyncClose?: boolean;
|
||||||
|
swipeDuration?: number;
|
||||||
|
startPosition?: number;
|
||||||
showIndicators?: boolean;
|
showIndicators?: boolean;
|
||||||
closeOnPopstate?: boolean;
|
closeOnPopstate?: boolean;
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user