From 21b782dd3137ac833571d7621a260e5c29532592 Mon Sep 17 00:00:00 2001 From: x_ying <2438792676@qq.com> Date: Sat, 17 Sep 2022 10:29:03 +0800 Subject: [PATCH] =?UTF-8?q?warn=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/environmentalScreen/module/numFlip.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/views/environmentalScreen/module/numFlip.vue b/src/views/environmentalScreen/module/numFlip.vue index 1657145..055b449 100644 --- a/src/views/environmentalScreen/module/numFlip.vue +++ b/src/views/environmentalScreen/module/numFlip.vue @@ -2,7 +2,7 @@
-
  • 0123456789
  • +
  • 0123456789
  • @@ -13,10 +13,11 @@ export default { props: { tnum: { type: String, - default: null + default: null, + timer: null }, chartnum: { - type: Array, + type: Number, default: function() { return 0 } @@ -25,7 +26,8 @@ export default { data() { return { echartnum: this.chartnum, - flipNum: [0, 0, 0, 0, 0, 0, 0, 0] + flipNum: [0, 0, 0, 0, 0, 0, 0, 0], + ikey: [1, 2, 3, 4, 5, 6, 7, 8] } }, mounted() { @@ -44,7 +46,8 @@ export default { // document.getElementById(this.tnum).innerHTML = strHtml // 定时改变数字 const _this = this - setInterval(() => { + this.timer = null + this.timer = setInterval(() => { // _this.toOrderNum('123456') _this.toOrderNum(this.chartnum) _this.setNumberTransform()