Skip to content

Commit

Permalink
fix: pi-marquee速度改为每秒移动多少像素
Browse files Browse the repository at this point in the history
  • Loading branch information
sadais-lwt committed Aug 20, 2021
1 parent 825706a commit 45f83ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions components/pi-marquee/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export default {
// `'rl'`
default: marquee.direction
},
// 动画移动速度:每毫秒移动多少像素
// 动画移动速度:每秒移动多少像素
speed: {
type: Number,
// 0.1px
// 100
default: marquee.speed
},
// 是否支持鼠标移上去暂停滚动
Expand Down Expand Up @@ -140,7 +140,7 @@ export default {
this.handlePause()
this.showCopy = false
} else {
const time = inner.width / this.speed / 1000
const time = inner.width / this.speed
this.$set(this.animate, 'animationDuration', `${time}s`)
this.showCopy = true
}
Expand All @@ -149,7 +149,7 @@ export default {
this.$set(this.animate, 'animationPlayState', 'paused')
this.showCopy = false
} else {
const time = inner.height / this.speed / 1000
const time = inner.height / this.speed
this.$set(this.animate, 'animationDuration', `${time}s`)
this.showCopy = true
}
Expand Down
2 changes: 1 addition & 1 deletion config/marquee.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
direction: 'rl', // 滚动方向
speed: 0.1, // 移动速度 即每毫秒移动多少像素
speed: 100, // 移动速度 即每毫秒移动多少像素
hoverPause: true,
customStyle: {},
customClass: ''
Expand Down

0 comments on commit 45f83ae

Please sign in to comment.