diff --git a/src/image-preview/ImagePreview.js b/src/image-preview/ImagePreview.js index 1986f6372..58de13120 100644 --- a/src/image-preview/ImagePreview.js +++ b/src/image-preview/ImagePreview.js @@ -54,7 +54,7 @@ export default createComponent({ }, swipeDuration: { type: [Number, String], - default: 500, + default: 300, }, startPosition: { type: [Number, String], diff --git a/src/image-preview/README.md b/src/image-preview/README.md index 6064d3d75..69636e3f3 100644 --- a/src/image-preview/README.md +++ b/src/image-preview/README.md @@ -117,7 +117,7 @@ export default { | showIndex | Whether to show index | _boolean_ | `true` | | showIndicators | Whether to show indicators | _boolean_ | `false` | | loop | Whether to enable loop | _boolean_ | `true` | -| swipeDuration | Animation duration (ms) | _number \| string_ | `500` | +| swipeDuration | Animation duration (ms) | _number \| string_ | `300` | | onClose | Emitted when ImagePreview is closed | _Function_ | - | | onChange | Emitted when current image changed | _Function_ | - | | onScale | Emitted when scaling current image | _Function_ | - | @@ -137,7 +137,7 @@ export default { | --- | --- | --- | --- | | images | Images URL list | _string[]_ | `[]` | | start-position | Start position | _number \| string_ | `0` | -| swipe-duration | Animation duration (ms) | _number \| string_ | `500` | +| swipe-duration | Animation duration (ms) | _number \| string_ | `300` | | show-index | Whether to show index | _boolean_ | `true` | | show-indicators | Whether to show indicators | _boolean_ | `false` | | loop | Whether to enable loop | _boolean_ | `true` | diff --git a/src/image-preview/README.zh-CN.md b/src/image-preview/README.zh-CN.md index e4b427d07..9bf9bcd7c 100644 --- a/src/image-preview/README.zh-CN.md +++ b/src/image-preview/README.zh-CN.md @@ -150,7 +150,7 @@ export default { | --- | --- | --- | --- | | images | 需要预览的图片 URL 数组 | _string[]_ | `[]` | | startPosition | 图片预览起始位置索引 | _number \| string_ | `0` | -| swipeDuration | 动画时长,单位为`ms` | _number \| string_ | `500` | +| swipeDuration | 动画时长,单位为`ms` | _number \| string_ | `300` | | showIndex | 是否显示页码 | _boolean_ | `true` | | showIndicators | 是否显示轮播指示器 | _boolean_ | `false` | | loop | 是否开启循环播放 | _boolean_ | `true` | @@ -175,7 +175,7 @@ export default { | --- | --- | --- | --- | | images | 需要预览的图片 URL 数组 | _string[]_ | `[]` | | start-position | 图片预览起始位置索引 | _number \| string_ | `0` | -| swipe-duration | 动画时长,单位为 ms | _number \| string_ | `500` | +| swipe-duration | 动画时长,单位为 ms | _number \| string_ | `300` | | show-index | 是否显示页码 | _boolean_ | `true` | | show-indicators | 是否显示轮播指示器 | _boolean_ | `false` | | loop | 是否开启循环播放 | _boolean_ | `true` | diff --git a/src/image-preview/index.js b/src/image-preview/index.js index 0b156636c..874af2887 100644 --- a/src/image-preview/index.js +++ b/src/image-preview/index.js @@ -19,7 +19,7 @@ const defaultConfig = { asyncClose: false, getContainer: 'body', startPosition: 0, - swipeDuration: 500, + swipeDuration: 300, showIndicators: false, closeOnPopstate: true, closeIconPosition: 'top-right', diff --git a/src/image-preview/test/__snapshots__/index.spec.js.snap b/src/image-preview/test/__snapshots__/index.spec.js.snap index fb3dfe278..e4edeabba 100644 --- a/src/image-preview/test/__snapshots__/index.spec.js.snap +++ b/src/image-preview/test/__snapshots__/index.spec.js.snap @@ -42,7 +42,7 @@ exports[`index slot 1`] = ` exports[`render image 1`] = `
-
+