Commit 5a12c415 authored by chenqikuai's avatar chenqikuai

fix

parent c02424fb
......@@ -44,13 +44,13 @@ export default Vue.extend({
handleChange(v: number) {
this.index = v
if (this.timer) clearInterval(this.timer)
this.timer = setInterval(() => {
this.timer = window.setInterval(() => {
this.index < 4 ? this.index++ : this.index = 1
}, 4000)
}
},
created() {
this.timer = setInterval(() => {
this.timer = window.setInterval(() => {
this.index < 4 ? this.index++ : this.index = 1
}, 4000)
},
......
......@@ -16,7 +16,7 @@ export default Vue.extend({
mounted() {
this.caculateTime()
if (this.Timer === 0)
this.Timer = setInterval(() => {
this.Timer = window.setInterval(() => {
this.caculateTime()
}, 1000)
},
......
......@@ -47,13 +47,13 @@ export default Vue.extend({
handleChange(v: number) {
this.index = v
if (this.timer) clearInterval(this.timer)
this.timer = setInterval(() => {
this.timer = window.setInterval(() => {
this.index < 4 ? this.index++ : this.index = 1
}, 4000)
}
},
created() {
this.timer = setInterval(() => {
this.timer = window.setInterval(() => {
this.index < 4 ? this.index++ : this.index = 1
}, 4000)
},
......
......@@ -154,7 +154,7 @@ export default Vue.extend({
},
initTimer() {
if (this.timer) clearInterval(this.timer)
this.timer = setInterval(() => {
this.timer = window.setInterval(() => {
this.index++
this.clickChange(this.index)
if (this.index === 13) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment