diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 0802ba8..99e68c2 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -111,9 +111,9 @@ -
i +
@@ -223,40 +223,33 @@ export default { this.warringList = [] let i = 1 let timeout = null - let first = false - let timeoutF = () => { - timeout = setInterval(() => { - if (i >= listLength) { - first = true - clearInterval(timeout) - } - if (this.warringWaitList.length > 0) { - this.warringList.splice(this.warringList.length, 0, this.warringWaitList.splice(0, 1)[0]) - } - i++ - }, 1000) - } - timeoutF() + let first = true + this.warringList = this.warringWaitList + // let timeoutF = () => { + // timeout = setInterval(() => { + // if (i >= listLength) { + // first = true + // clearInterval(timeout) + // } + // if (this.warringWaitList.length > 0) { + // this.warringList.splice(this.warringList.length, 0, this.warringWaitList.splice(0, 1)[0]) + // } + // i++ + // }, 1000) + // } + // timeoutF() setInterval(() => { - console.log(1) if (first && this.warringWaitList.length > 0) { - if (this.warringList.length >= listLength) { - this.warringList.splice(0, 1) - } - setTimeout(() => { - this.warringList.splice(this.warringList.length, 0, this.warringWaitList.splice(0, 1)[0]) - }, 500) + let lastData = this.warringList.splice(0, 1) + setTimeout(()=>{ + this.warringList.splice(this.warringList.length, 0, lastData[0] || this.warringWaitList.splice(0, 1)[0]) + },200) } - }, 1000) - - // console.log(this.warringList) - // console.log(domList.at(-1)) - - // domParent.scrollTop += 100 + }, 2000) }) setInterval(() => { this.setInfo() - }, 10 * 1000) + }, 60 * 1000) // }) }, beforeDestroy() {