From 6ce278181e835a48d572421b6d02f17fccc7031e Mon Sep 17 00:00:00 2001 From: wam <525987762@qq.com> Date: Thu, 1 Dec 2022 23:27:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug=20=E5=9B=BE=E6=96=87=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E5=AE=9A=E6=97=B6=E5=99=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Answer/questions/components/AnswerViewer.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/Answer/questions/components/AnswerViewer.vue b/src/views/Answer/questions/components/AnswerViewer.vue index ac1b5a1a..e0ebcab9 100644 --- a/src/views/Answer/questions/components/AnswerViewer.vue +++ b/src/views/Answer/questions/components/AnswerViewer.vue @@ -195,10 +195,13 @@ export default defineComponent({ } } }, + + showTimeTimeoutId: 0, }; }, beforeUnmount() { this.pager.clear(); + if(this.showTimeTimeoutId) clearTimeout(this.showTimeTimeoutId); }, async mounted() { @@ -220,7 +223,10 @@ export default defineComponent({ this.shopData = buildShopDataDemo(this.scene); if(this.config.is_show_time && this.config.show_time){ - setTimeout(() => this.$emit("next"), this.config.show_time * 1000) + this.showTimeTimeoutId = setTimeout(() => { + this.showTimeTimeoutId = 0; + this.$emit("next"); + }, this.config.show_time * 1000) } if(this.config.is_three_dimensions) {