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 19, 2021
1 parent 250a05d commit 7726ed4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion components/pi-marquee/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@mouseleave="handleStart"
>
<div class="inner" :style="animateTime">
<!-- 默认插槽:放置pi-marquee-item -->
<slot />
</div>
<div v-if="showCopy" class="inner" :style="animateTime">
Expand All @@ -24,8 +25,9 @@ export default {
props: {
// 控制方向
direction: {
// vertical or horizontal
// `'vertical'` or `'horizontal'`
type: String,
// `'horizontal'`
default: marquee.direction
},
// 动画移动速度:每毫秒移动多少像素
Expand Down Expand Up @@ -68,12 +70,22 @@ export default {
window.removeEventListener('resize', this.updateTime)
},
methods: {
/**
* @vuese
* 暂停动画
* @arg
*/
handlePause() {
if (!this.hoverPause) {
return
}
this.animateTime = 'animation: none'
},
/**
* @vuese
* 开始动画 重新计算动画时间
* @arg
*/
handleStart() {
if (!this.hoverPause) {
return
Expand Down

0 comments on commit 7726ed4

Please sign in to comment.