From e7df7ebaed5a8bd6bf8d289359bcb6c96ba243eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Sat, 3 Jul 2021 16:22:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 3 +- .../frame/components/setting/Setting.vue | 124 +++++++++++++----- src/pages/frame/layouts/AdminLayout.vue | 1 + src/pages/home/index.js | 3 + src/pages/system/view/log/login_log/index.js | 3 + src/router/index.js | 32 +++-- 6 files changed, 116 insertions(+), 50 deletions(-) create mode 100644 src/pages/home/index.js create mode 100644 src/pages/system/view/log/login_log/index.js diff --git a/src/main.js b/src/main.js index 32eb188..19ea87b 100644 --- a/src/main.js +++ b/src/main.js @@ -33,8 +33,7 @@ const store = new Vuex.Store({ //装载vue-router控件 如果开发时 不用动态可直接修改这里 isAsynRount=false Vue.use(Router); -const isAsynRount = store.state.settingModule.asyncRoutes; -const options = initRouter(isAsynRount); +const options = initRouter(); const router = new Router(options); //装载vue-i18n控件 如果语言优先级 请直接修改这里localeLang和fallbackLang diff --git a/src/pages/frame/components/setting/Setting.vue b/src/pages/frame/components/setting/Setting.vue index e75ee2b..f6622fe 100644 --- a/src/pages/frame/components/setting/Setting.vue +++ b/src/pages/frame/components/setting/Setting.vue @@ -1,44 +1,84 @@ @@ -176,7 +238,7 @@ export default { }, computed: { directions() { - return this.animates.find((item) => item.name == this.animate.name).directions; + return this.animates.find(item => item.name == this.animate.name).directions; }, ...mapState('settingModule', [ 'theme', @@ -192,7 +254,7 @@ export default { ]), }, watch: { - 'animate.name': function (val) { + 'animate.name': function(val) { this.setAnimate({ name: val, direction: this.directions[0] }); }, }, @@ -220,7 +282,7 @@ export default { let config = {}; let mySetting = this.$store.state.settingModule; let dftSetting = local ? settingConfig : settingConfig; - Object.keys(mySetting).forEach((key) => { + Object.keys(mySetting).forEach(key => { const dftValue = dftSetting[key], myValue = mySetting[key]; if (dftValue != undefined && !fastEqual(dftValue, myValue)) { diff --git a/src/pages/frame/layouts/AdminLayout.vue b/src/pages/frame/layouts/AdminLayout.vue index ad47f97..3995470 100644 --- a/src/pages/frame/layouts/AdminLayout.vue +++ b/src/pages/frame/layouts/AdminLayout.vue @@ -170,6 +170,7 @@ export default {