From c3ded4cbcb3330d8c9892f01a59f0c3c25766194 Mon Sep 17 00:00:00 2001
From: mk <2403457699@qq.com>
Date: Fri, 5 Jan 2024 14:56:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=AD=BB=E5=BE=AA=E7=8E=AF,=E6=B3=A8=E6=8E=89j?=
=?UTF-8?q?s=E5=BC=95=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/index.html | 2 +-
.../jinshui-impression/index.vue | 44 +++++++++++++------
2 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/public/index.html b/public/index.html
index 4de9392..df364a8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -15,7 +15,7 @@
-
+
<% if (process.env.NODE_ENV === 'development') { %>
diff --git a/src/views/next/screen-content-left/jinshui-impression/index.vue b/src/views/next/screen-content-left/jinshui-impression/index.vue
index 1e2f464..200f9d4 100644
--- a/src/views/next/screen-content-left/jinshui-impression/index.vue
+++ b/src/views/next/screen-content-left/jinshui-impression/index.vue
@@ -95,20 +95,36 @@ export default {
this.videoStatus = 'end'
},
// 文字滚动效果
- textScroll () {
- this.textScrollId = setTimeout(() => {
- this.textScroll()
- }, 40)
- this.$nextTick(() => {
- if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) {
- this.scrollViewTop -= 1
- } else {
- clearTimeout(this.textScrollId)
- this.scrollViewTop = 0
- this.textScroll()
- }
- })
- }
+ // textScroll () {
+ // this.textScrollId = setTimeout(() => {
+ // this.textScroll()
+ // }, 40)
+ // this.$nextTick(() => {
+ // if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) {
+ // this.scrollViewTop -= 1
+ // } else {
+ // clearTimeout(this.textScrollId)
+ // this.scrollViewTop = 0
+ // this.textScroll()
+ // }
+ // })
+ // }
+ textScroll() {
+ this.textScrollId = setTimeout(() => {
+ this.$nextTick(() => {
+ if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) {
+ this.scrollViewTop -= 1;
+ this.textScroll(); // 递归调用
+ } else {
+ clearTimeout(this.textScrollId);
+ this.scrollViewTop = 0;
+ // 继续递归调用
+ this.textScroll();
+ }
+ });
+ }, 40);
+}
+
}
}