From c57f6da46e2a52f7d5fb39d348d75134e57b0aca Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 19 一月 2021 10:21:00 +0800 Subject: [PATCH] 2021-01-19 --- src/views/news/index.vue | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/views/news/index.vue b/src/views/news/index.vue index 7bf6deb..d9027b7 100644 --- a/src/views/news/index.vue +++ b/src/views/news/index.vue @@ -58,6 +58,20 @@ SubjClasCode: '', SubjClasName: '鍏ㄩ儴' }) + + try { + let newstype = sessionStorage.getItem('newstype') + if (newstype) { + let index = this.tabs.findIndex((item) => item.SubjClasName === newstype) + if (index > -1) { + this.cur = index + } + } + sessionStorage.removeItem('newstype') + console.log(this.cur) + } catch (e) {} + + this.loaddata() }) }, loaddata () { @@ -72,7 +86,6 @@ }, mounted () { this.loadtabs() - this.loaddata() } } </script> @@ -96,6 +109,7 @@ text-align: center; background-color: #F4F4F4; border-bottom: 0.01rem solid #D7D7D7; + transition: all 0.3s; } .active { background: #20B7FE; @@ -176,6 +190,7 @@ display: inline-block; font-size: 0.16rem; cursor: pointer; + transition: all 0.3s; } .contentTitle_before,.contentTitle_after { position: absolute; -- Gitblit v1.8.0