diff --git a/src/locales/main/lang/en.json b/src/locales/main/lang/en.json index 2338572..db6b3db 100644 --- a/src/locales/main/lang/en.json +++ b/src/locales/main/lang/en.json @@ -70,5 +70,6 @@ "admin.roll-tools-api.qrcode.placeholder.content": "Please input content", "admin.roll-tools-api.qrcode.generate": "Generate", "admin.roll-tools-api.qrcode.logo_type_limit": "Logo file type must be {0}", - "admin.roll-tools-api.qrcode.logo_size_limit": "Logo file size cannot exceed {0}" + "admin.roll-tools-api.qrcode.logo_size_limit": "Logo file size cannot exceed {0}", + "admin.preferences.flat": "Flat mode" } diff --git a/src/locales/main/lang/zh-CN.json b/src/locales/main/lang/zh-CN.json index d89251b..cd2a358 100644 --- a/src/locales/main/lang/zh-CN.json +++ b/src/locales/main/lang/zh-CN.json @@ -70,5 +70,6 @@ "admin.roll-tools-api.qrcode.placeholder.content": "请输入内容", "admin.roll-tools-api.qrcode.generate": "立即生成", "admin.roll-tools-api.qrcode.logo_type_limit": "Logo 图片只能是 {0} 格式", - "admin.roll-tools-api.qrcode.logo_size_limit": "Logo 文件大小不能超过 {0}" + "admin.roll-tools-api.qrcode.logo_size_limit": "Logo 文件大小不能超过 {0}", + "admin.preferences.flat": "小屏模式" } diff --git a/src/store/modules/admin/index.js b/src/store/modules/admin/index.js index a7825ce..6f8a1b4 100644 --- a/src/store/modules/admin/index.js +++ b/src/store/modules/admin/index.js @@ -19,6 +19,7 @@ const init = app => { asideTransition: true, pageTransition: true, showSourceLink: true, + flat: false, token: null }) diff --git a/src/store/modules/admin/mixins.js b/src/store/modules/admin/mixins.js index df52aaa..0d87ad6 100644 --- a/src/store/modules/admin/mixins.js +++ b/src/store/modules/admin/mixins.js @@ -43,3 +43,9 @@ export const token = { ...mapFields(namespace, ['token']) } } + +export const flat = { + computed: { + ...mapFields(namespace, ['flat']) + } +} diff --git a/src/views/admin/$index/components/AsideNavMenu/index.vue b/src/views/admin/$index/components/AsideNavMenu/index.vue index d893226..488d3b0 100644 --- a/src/views/admin/$index/components/AsideNavMenu/index.vue +++ b/src/views/admin/$index/components/AsideNavMenu/index.vue @@ -73,6 +73,11 @@ export default { router: true, 'default-active': this.$route.path, collapse: this.collapse + }, + on: { + select: (index, deepIndex, targetComponent) => { + this.$emit('select', index, deepIndex, targetComponent) + } } }, map(this.menu, it) diff --git a/src/views/admin/$index/components/PageContainer/style.styl b/src/views/admin/$index/components/PageContainer/style.styl index c2186cd..8dadb1e 100644 --- a/src/views/admin/$index/components/PageContainer/style.styl +++ b/src/views/admin/$index/components/PageContainer/style.styl @@ -53,3 +53,14 @@ border-top none border-top-left-radius 0 border-top-right-radius 0 + + // for flat mode + &.flat + border-radius 0 + border-right 0 + border-left 0 + > + .header, .footer + border-radius 0 + border-right 0 + border-left 0 diff --git a/src/views/admin/$index/index.vue b/src/views/admin/$index/index.vue index a083bc5..192a729 100644 --- a/src/views/admin/$index/index.vue +++ b/src/views/admin/$index/index.vue @@ -1,5 +1,8 @@