style:首页增加定时器
Showing
2 changed files
with
4 additions
and
6 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-07-03 17:08:05 | 4 | * @LastEditTime: 2023-07-04 13:44:17 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <Chart :cdata="cdata" /> | 7 | <Chart :cdata="cdata" /> |
... | @@ -21,9 +21,7 @@ | ... | @@ -21,9 +21,7 @@ |
21 | Chart | 21 | Chart |
22 | }, | 22 | }, |
23 | mounted () { | 23 | mounted () { |
24 | this.$nextTick(() => { | 24 | this.mapViews() |
25 | this.mapViews() | ||
26 | }) | ||
27 | this.timer = setInterval(() => { | 25 | this.timer = setInterval(() => { |
28 | this.mapViews(); | 26 | this.mapViews(); |
29 | }, 10000) // 10s | 27 | }, 10000) // 10s | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description :工作台右侧表 | 2 | * @Description :工作台右侧表 |
3 | * @Autor : miaofang | 3 | * @Autor : miaofang |
4 | * @LastEditTime: 2023-07-03 16:54:36 | 4 | * @LastEditTime: 2023-07-04 13:42:46 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="rightcard"> | 7 | <div class="rightcard"> |
... | @@ -47,7 +47,7 @@ | ... | @@ -47,7 +47,7 @@ |
47 | this.getdjywltotal() | 47 | this.getdjywltotal() |
48 | this.timer = setInterval(() => { | 48 | this.timer = setInterval(() => { |
49 | this.getdjywltotal() | 49 | this.getdjywltotal() |
50 | }, 5000) // 5s | 50 | }, 10000) // 10s |
51 | }, | 51 | }, |
52 | mounted () { | 52 | mounted () { |
53 | window.addEventListener("resize", () => { | 53 | window.addEventListener("resize", () => { | ... | ... |
-
Please register or sign in to post a comment