feat(NoticeBar): increase default speed to 60

This commit is contained in:
chenjiahan 2021-05-11 15:53:42 +08:00
parent a308317f51
commit a486630fe3
4 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ Vue.use(NoticeBar);
| background | Background color | _string_ | `#fff7cc` |
| left-icon | Left Icon | _string_ | - |
| delay | Animation delay (s) | _number \| string_ | `1` |
| speed | Scroll speed (px/s) | _number \| string_ | `50` |
| speed | Scroll speed (px/s) | _number \| string_ | `60` |
| scrollable | Whether to scroll content | _boolean_ | - |
| wrapable | Whether to enable text wrap | _boolean_ | `false` | - |

View File

@ -113,7 +113,7 @@ Vue.use(NoticeBar);
| background | 滚动条背景 | _string_ | `#fff7cc` |
| left-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
| delay | 动画延迟时间 (s) | _number \| string_ | `1` |
| speed | 滚动速率 (px/s) | _number \| string_ | `50` |
| speed | 滚动速率 (px/s) | _number \| string_ | `60` |
| scrollable | 是否开启滚动播放,内容长度溢出时默认开启 | _boolean_ | - |
| wrapable | 是否开启文本换行,只在禁用滚动时生效 | _boolean_ | `false` |

View File

@ -31,7 +31,7 @@ export default createComponent({
},
speed: {
type: [Number, String],
default: 50,
default: 60,
},
},

View File

@ -19,7 +19,7 @@ exports[`should not scroll when content width > wrap width 1`] = `
exports[`should scroll when content width > wrap width 1`] = `
<div role="alert" class="van-notice-bar">
<div role="marquee" class="van-notice-bar__wrap">
<div class="van-notice-bar__content" style="transition-duration: 2s; transform: translateX(-100px);">foo</div>
<div class="van-notice-bar__content" style="transition-duration: 1.6666666666666667s; transform: translateX(-100px);">foo</div>
</div>
</div>
`;