From 3eac0b7591078c1d8383e71d2553f54b07365bbb Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Wed, 23 Jan 2019 16:30:17 +0800 Subject: [PATCH] 滚动播报 --- src/components/orderMessage/index.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/orderMessage/index.vue b/src/components/orderMessage/index.vue index d1d015a..4a18ead 100644 --- a/src/components/orderMessage/index.vue +++ b/src/components/orderMessage/index.vue @@ -54,12 +54,8 @@ this.list = data; var that = this this.intnum = setInterval(_ => { - if (this.activeIndex < this.list.length) { - this.activeIndex += 1; - that.list.push(that.list[0]); - } else { - this.activeIndex = 0; - } + that.list.push(that.list[this.activeIndex]); + this.activeIndex += 1; }, 1000); }).catch((response)=>{ console.log(response); -- libgit2 0.21.4