mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Barrage): rename speed to duration (#11894)
This commit is contained in:
parent
3bbe31da1b
commit
b5bb20e6c1
@ -24,7 +24,7 @@ export interface BarrageItem {
|
|||||||
export const barrageProps = {
|
export const barrageProps = {
|
||||||
top: makeNumericProp(10),
|
top: makeNumericProp(10),
|
||||||
rows: makeNumericProp(4),
|
rows: makeNumericProp(4),
|
||||||
speed: makeNumericProp(4000),
|
duration: makeNumericProp(4000),
|
||||||
autoPlay: truthProp,
|
autoPlay: truthProp,
|
||||||
delay: makeNumberProp(300),
|
delay: makeNumberProp(300),
|
||||||
modelValue: makeArrayProp<BarrageItem>(),
|
modelValue: makeArrayProp<BarrageItem>(),
|
||||||
@ -55,7 +55,7 @@ export default defineComponent({
|
|||||||
item.className = className;
|
item.className = className;
|
||||||
item.innerText = String(text);
|
item.innerText = String(text);
|
||||||
|
|
||||||
item.style.animationDuration = `${props.speed}ms`;
|
item.style.animationDuration = `${props.duration}ms`;
|
||||||
item.style.animationDelay = `${delay}ms`;
|
item.style.animationDelay = `${delay}ms`;
|
||||||
item.style.animationName = 'van-barrage';
|
item.style.animationName = 'van-barrage';
|
||||||
item.style.animationTimingFunction = 'linear';
|
item.style.animationTimingFunction = 'linear';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
### Intro
|
### Intro
|
||||||
|
|
||||||
To realize the critical subtitle function when watching the video.
|
To realize the critical subtitle function when watching the video. Please upgrade `vant` to >= v4.4.0 before using this component.
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ export default {
|
|||||||
| auto-play | Whether to play the bullet screen automatically | _boolean_ | `true` |
|
| auto-play | Whether to play the bullet screen automatically | _boolean_ | `true` |
|
||||||
| rows | The number of lines of text | _number \| string_ | `4` |
|
| rows | The number of lines of text | _number \| string_ | `4` |
|
||||||
| top | Spacing between the top of the barrage area, unit `px` | _number \| string_ | `10` |
|
| top | Spacing between the top of the barrage area, unit `px` | _number \| string_ | `10` |
|
||||||
| speed | Speed of passing, unit `ms` | _number \| string_ | `4000` |
|
| duration | Text animation duration, unit `ms` | _number \| string_ | `4000` |
|
||||||
| delay | Barrage animation delay, unit `ms` | _number_ | `300` |
|
| delay | Barrage animation delay, unit `ms` | _number_ | `300` |
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
### 介绍
|
### 介绍
|
||||||
|
|
||||||
实现观看视频时弹出的评论性字幕功能。
|
实现观看视频时弹出的评论性字幕功能。请升级 `vant` 到 >= 4.4.0 版本来使用该组件。
|
||||||
|
|
||||||
### 引入
|
### 引入
|
||||||
|
|
||||||
@ -107,14 +107,14 @@ export default {
|
|||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
| --------- | ------------------------------- | ------------------ | ------ |
|
| --------- | --------------------------------- | ------------------ | ------ |
|
||||||
| v-model | 弹幕数据 | _BarrageItem[]_ | - |
|
| v-model | 弹幕数据 | _BarrageItem[]_ | - |
|
||||||
| auto-play | 是否自动播放弹幕 | _boolean_ | `true` |
|
| auto-play | 是否自动播放弹幕 | _boolean_ | `true` |
|
||||||
| rows | 弹幕文字行数 | _number \| string_ | `4` |
|
| rows | 弹幕文字行数 | _number \| string_ | `4` |
|
||||||
| top | 弹幕文字区域顶部间距,单位 `px` | _number \| string_ | `10` |
|
| top | 弹幕文字区域顶部间距,单位 `px` | _number \| string_ | `10` |
|
||||||
| speed | 文字滑过容器的时间,单位 `ms` | _number \| string_ | `4000` |
|
| duration | 弹幕文字滑过容器的时间,单位 `ms` | _number \| string_ | `4000` |
|
||||||
| delay | 弹幕动画延时,单位 `ms` | _number_ | `300` |
|
| delay | 弹幕动画延时,单位 `ms` | _number_ | `300` |
|
||||||
|
|
||||||
### 方法
|
### 方法
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user