diff --git a/src/image-preview/ImagePreview.js b/src/image-preview/ImagePreview.js index 53299d088..70c32fac3 100644 --- a/src/image-preview/ImagePreview.js +++ b/src/image-preview/ImagePreview.js @@ -47,7 +47,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 baec912d5..a8af3945f 100644 --- a/src/image-preview/README.md +++ b/src/image-preview/README.md @@ -147,7 +147,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 789a38114..56c944490 100644 --- a/src/image-preview/README.zh-CN.md +++ b/src/image-preview/README.zh-CN.md @@ -161,7 +161,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 { | minZoom | 手势缩放时,最小缩放比例 | _number \| string_ | `1/3` | | closeable | 是否显示关闭图标 | _boolean_ | `false` | | closeIcon | 关闭图标名称或图片链接 | _string_ | `clear` | -| closeIconPosition | 关闭图标位置,可选值为`top-left`
`bottom-left` `bottom-right` | _string_ | `top-right` | +| closeIconPosition | 关闭图标位置,可选值为 `top-left`
`bottom-left` `bottom-right` | _string_ | `top-right` | | teleport | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| Element_ | - | ### Props diff --git a/src/image-preview/index.js b/src/image-preview/index.js index 4cd178fd8..b83aec2ce 100644 --- a/src/image-preview/index.js +++ b/src/image-preview/index.js @@ -19,7 +19,7 @@ const defaultConfig = { closeIcon: 'clear', beforeClose: null, 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 b972b1098..d6f6ae45f 100644 --- a/src/image-preview/test/__snapshots__/index.spec.js.snap +++ b/src/image-preview/test/__snapshots__/index.spec.js.snap @@ -22,7 +22,7 @@ exports[`should render cover slot correctly 1`] = `
-