From 71151235b11e08a8600666e0676757b987e7d776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Tue, 5 Sep 2023 16:20:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=BD=AE=E6=92=AD=E5=9B=BE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/projectGroup/components/AutoRollComponent.jsx | 4 ++-- .../src/sections/projectGroup/containers/bigscreen.jsx | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/web/client/src/sections/projectGroup/components/AutoRollComponent.jsx b/web/client/src/sections/projectGroup/components/AutoRollComponent.jsx index d85a6b1..a3afd36 100644 --- a/web/client/src/sections/projectGroup/components/AutoRollComponent.jsx +++ b/web/client/src/sections/projectGroup/components/AutoRollComponent.jsx @@ -7,7 +7,7 @@ export default class AutoRollComponent extends Component { constructor(props) { super(props); this.scrollElem = null; - this.stopscroll = true; + this.stopscroll = false; this.preTop = 0; this.cloneEle = null; this.currentTop = 0; @@ -57,7 +57,7 @@ export default class AutoRollComponent extends Component { this.scrollElem.scrollTop = this.marqueesHeight; this.scrollElem.scrollTop = this.scrollElem.scrollTop + offset; } - }, 40); + }, 100); } componentWillUnmount() { diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index 97f6e29..9d928cd 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -103,16 +103,13 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou setXData([bigD, (bigD - bigD / 5), (bigD - bigD * 2 / 5), (bigD - bigD * 3 / 5), (bigD - bigD * 4 / 5), 0, (bigD - bigD * 4 / 5), (bigD - bigD * 3 / 5), (bigD - bigD * 2 / 5), (bigD - bigD / 5), bigD]) } setBiggest(bigD) - if (mockData && mockData.length > 3 && mockData.length < 21) { - const newArray = mockData.slice(3) - setAlarmData(newArray) - } if (mockData && mockData.length > 21) { //数据大于20的话,取前20 const newArray = mockData.slice(0, 20) - console.log('newArray',newArray) setAlarmData(newArray) + }else{ + setAlarmData(mockData) } }, [mockData])