From 7e637c8c859b4b6272c72b16e339f1a35bdb9aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Wed, 8 Nov 2023 18:04:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8keep=20alive=20=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=BB=84=E4=BB=B6=E5=90=8E=EF=BC=8C=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E5=99=A8=E4=B8=8D=E8=83=BD=E9=94=80=E6=AF=81=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/index.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 10993c5..9c9f022 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -184,16 +184,23 @@ export default { watch: { $route: { handler: function (val, oldVal) { - if (val.name !== 'station-operation') { - this.$message.destroy() - clearInterval(this.timer) - this.timer = null + console.log('fasdfasde12312', val) + console.log('8765432', oldVal) + if (val.name === 'station-operation') { + this.getDataProvisionEfficiency(this.markerList_clone) } }, deep: true, - immediate: true, + // immediate: true, }, }, + deactivated() { + //等同于 销毁的生命周期 + console.log('切换出发了3') + this.$message.destroy() + clearInterval(this.timer) + this.timer = null + }, data() { return { activeKey: '1',