mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-10 06:29:46 +08:00
perf(ImagePreview): adjust default swipeDuration to 300ms (#7970)
This commit is contained in:
parent
b0fb58856c
commit
fcb5c223ba
@ -47,7 +47,7 @@ export default createComponent({
|
||||
},
|
||||
swipeDuration: {
|
||||
type: [Number, String],
|
||||
default: 500,
|
||||
default: 300,
|
||||
},
|
||||
startPosition: {
|
||||
type: [Number, String],
|
||||
|
@ -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` |
|
||||
|
@ -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` |
|
||||
|
@ -19,7 +19,7 @@ const defaultConfig = {
|
||||
closeIcon: 'clear',
|
||||
beforeClose: null,
|
||||
startPosition: 0,
|
||||
swipeDuration: 500,
|
||||
swipeDuration: 300,
|
||||
showIndicators: false,
|
||||
closeOnPopstate: true,
|
||||
closeIconPosition: 'top-right',
|
||||
|
@ -22,7 +22,7 @@ exports[`should render cover slot correctly 1`] = `
|
||||
<transition-stub>
|
||||
<div class="van-popup van-popup--center van-image-preview">
|
||||
<div class="van-swipe van-image-preview__swipe">
|
||||
<div style="transition-duration: 500ms; transform: translateX(0px);"
|
||||
<div style="transition-duration: 300ms; transform: translateX(0px);"
|
||||
class="van-swipe__track"
|
||||
>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user