diff --git a/ui/src/layout/components/app-header/index.vue b/ui/src/layout/components/app-header/index.vue new file mode 100644 index 000000000..6a64d2ac1 --- /dev/null +++ b/ui/src/layout/components/app-header/index.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/ui/src/layout/components/index.ts b/ui/src/layout/components/index.ts index 7b1d22e32..c6d38f7c4 100644 --- a/ui/src/layout/components/index.ts +++ b/ui/src/layout/components/index.ts @@ -1,3 +1,4 @@ export { default as Sidebar } from './sidebar/index.vue' export { default as AppMain } from './app-main/index.vue' export { default as TopBar } from './top-bar/index.vue' +export { default as AppHeader } from './app-header/index.vue' diff --git a/ui/src/layout/components/top-bar/index.vue b/ui/src/layout/components/top-bar/index.vue index 84de2fe1c..162fd8522 100644 --- a/ui/src/layout/components/top-bar/index.vue +++ b/ui/src/layout/components/top-bar/index.vue @@ -12,7 +12,9 @@
diff --git a/ui/src/layout/layout-template/AppLayout.vue b/ui/src/layout/layout-template/AppLayout.vue index f47a0b80a..faa91ee57 100644 --- a/ui/src/layout/layout-template/AppLayout.vue +++ b/ui/src/layout/layout-template/AppLayout.vue @@ -1,36 +1,15 @@ diff --git a/ui/src/layout/layout-template/DetailLayout.vue b/ui/src/layout/layout-template/DetailLayout.vue index 31ace597b..9e1a6c201 100644 --- a/ui/src/layout/layout-template/DetailLayout.vue +++ b/ui/src/layout/layout-template/DetailLayout.vue @@ -12,15 +12,7 @@ - diff --git a/ui/src/layout/layout-template/SystemLayout.vue b/ui/src/layout/layout-template/SystemLayout.vue index 85887bcd7..27ede72ff 100644 --- a/ui/src/layout/layout-template/SystemLayout.vue +++ b/ui/src/layout/layout-template/SystemLayout.vue @@ -1,8 +1,6 @@ - diff --git a/ui/src/layout/layout-template/index.scss b/ui/src/layout/layout-template/index.scss new file mode 100644 index 000000000..56bff011c --- /dev/null +++ b/ui/src/layout/layout-template/index.scss @@ -0,0 +1,23 @@ +.app-layout { + background-color: var(--app-layout-bg-color); + height: 100%; +} + +.app-main { + position: relative; + height: 100%; + padding: var(--app-header-height) 0 0 !important; + box-sizing: border-box; + overflow: auto; +} + +.sidebar-container { + box-sizing: border-box; + transition: width 0.28s; + width: var(--sidebar-width); + min-width: var(--sidebar-width); + background-color: var(--sidebar-bg-color); +} +.view-container { + width: calc(100% - var(--sidebar-width)); +} diff --git a/ui/src/views/theme/index.vue b/ui/src/views/theme/index.vue index a92a4c6ba..106935110 100644 --- a/ui/src/views/theme/index.vue +++ b/ui/src/views/theme/index.vue @@ -102,6 +102,8 @@ import { ref, reactive, watch } from 'vue' import type { FormInstance, FormRules } from 'element-plus' import LoginPreview from './LoginPreview.vue' import { useElementPlusTheme } from 'use-element-plus-theme' +import useStore from '@/stores' +const { common } = useStore() const themeList = [ { @@ -161,7 +163,7 @@ watch( () => themeForm.value.theme, (val) => { if (val) { - console.log(val) + common.setTheme(val) } } )