From 2ed0f5cd70f21c8b991c1156850148c89b1f9429 Mon Sep 17 00:00:00 2001 From: sc Date: Mon, 18 Oct 2021 10:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20fullpage=20=E6=95=B4=E9=A1=B5=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/tags.vue | 2 +- src/router/index.js | 6 +++++- src/views/other/fullpage.vue | 32 ++++++++++++++++++++++++++++++++ src/views/other/viewTags.vue | 7 +++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/views/other/fullpage.vue diff --git a/src/layout/components/tags.vue b/src/layout/components/tags.vue index 732f7862..f7c5e33b 100644 --- a/src/layout/components/tags.vue +++ b/src/layout/components/tags.vue @@ -99,7 +99,7 @@ }, //增加tag addViewTags(route) { - if(route.name){ + if(route.name && !route.meta.fullpage){ this.$store.commit("pushViewTags",route) this.$store.commit("pushKeepLive",route.name) } diff --git a/src/router/index.js b/src/router/index.js index fd4046d2..9c7b2ad6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -53,7 +53,11 @@ router.beforeEach(async (to, from, next) => { }); return false; } - + + //整页路由处理 + if(to.meta.fullpage){ + to.matched = [to.matched[to.matched.length-1]] + } //加载API路由 if(!isGetApiRouter){ let menu = tool.data.get("MENU"); diff --git a/src/views/other/fullpage.vue b/src/views/other/fullpage.vue new file mode 100644 index 00000000..d6ecd3d2 --- /dev/null +++ b/src/views/other/fullpage.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/other/viewTags.vue b/src/views/other/viewTags.vue index e1740e8e..20bdc92b 100644 --- a/src/views/other/viewTags.vue +++ b/src/views/other/viewTags.vue @@ -23,6 +23,10 @@ + + fullpage + + @@ -66,6 +70,9 @@ }, set1(){ useTabs.setTitle(this.input) + }, + fullpage(){ + this.$router.push('/other/fullpage') } } }