From fc9d7bd896b97a3b1edea484e8d96da3fdbd1c56 Mon Sep 17 00:00:00 2001 From: Frost-ZX <30585462+Frost-ZX@users.noreply.github.com> Date: Sat, 5 Jun 2021 19:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 44 +++++++++++++++++++++++++++++++++++++++++ src/assets/js/config.js | 3 +++ src/router/index.js | 16 +++++++++++++++ src/router/routes.js | 32 +++++++++++++++++++----------- 4 files changed, 84 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index 8e394e4..3c0d195 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,10 @@ @@ -104,6 +110,7 @@ export default { } }, watch: { + // 路由名称 '$route.name': { handler() { @@ -111,6 +118,7 @@ export default { this.showHeaderDropdown = false; } }, + // 更新储存的设置 'config.storage': { handler(obj) { @@ -122,6 +130,7 @@ export default { }, deep: true }, + // 改变字体大小 'config.storage.fontSize': { handler(value) { @@ -133,6 +142,7 @@ export default { }, 1000); } } + }, mounted() { var configStr = localStorage.getItem('navConfig'); @@ -147,6 +157,40 @@ export default {