diff --git a/src/App.vue b/src/App.vue index 02a521e..d403b7b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,6 +9,8 @@ position: relative; width: 100%; height: 100%; + /*background: #f6f8f9;*/ + /*background: goldenrod;*/ font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -16,6 +18,8 @@ } html,body{ height: 100%; + background: #f6f8f9; + } *{ margin: 0; diff --git a/src/components/u-setting/index.vue b/src/components/u-setting/index.vue new file mode 100644 index 0000000..f15b243 --- /dev/null +++ b/src/components/u-setting/index.vue @@ -0,0 +1,126 @@ + + + + + + \ No newline at end of file diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 4db3876..e48062a 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -1,28 +1,32 @@ - diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index e9ea0ad..0369603 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -2,49 +2,40 @@
- - - +
\ No newline at end of file diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 09ff744..9e09566 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -162,6 +162,8 @@ import {computed, nextTick, onMounted, reactive, ref, watch} from "vue"; background: #fff; padding: 0 8px; font-size: 12px; + padding: 0 10px; + box-sizing: border-box; margin-left: 5px; margin-top: 4px; &:first-of-type { diff --git a/src/layout/components/UHeader/index.vue b/src/layout/components/UHeader/index.vue index f119d42..baa4631 100644 --- a/src/layout/components/UHeader/index.vue +++ b/src/layout/components/UHeader/index.vue @@ -1,7 +1,13 @@ @@ -37,6 +43,7 @@ import TagViews from '../TagsView/index.vue' import UHamburger from "@/components/u-Hamburger/index.vue" import UScreenFull from '@/components/u-screenfull/index.vue' + import MenuSlide from '../Sidebar/menuSlide.vue' import {computed, ref,} from 'vue' import {useRouter} from 'vue-router' import { ElMessageBox, ElMessage } from 'element-plus' @@ -49,6 +56,13 @@ const isCollapse = computed(()=>{ return !store.state.app.isCollapse }) + const mode = computed(()=>{ + return store.state.setting.mode + }) + + const isShowTag = computed(()=>{ + return store.state.setting.isShowTag + }) const userInfo = computed(()=>{ return store.state.user.userInfo @@ -115,6 +129,8 @@ width: 100%; display: flex; align-items: center; + padding: 0 10px; + box-sizing: border-box; justify-content: space-between; .left{ display: flex; @@ -135,7 +151,7 @@ transition: left 0.28s; flex-shrink: 0; box-sizing: border-box; - padding: 0 10px; + box-shadow: 0 1px 4px rgb(0 21 41 / 8%); } .el-dropdown{ diff --git a/src/layout/index.vue b/src/layout/index.vue index eeef354..0b3fe6c 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,10 +1,14 @@ @@ -44,11 +48,20 @@ const handleClickOutside = ()=> { store.dispatch('app/closeSideBar', { withoutAnimation: false }) } + const isShowTag = computed(()=>{ + return store.state.setting.isShowTag + }) + const mode = computed(()=>{ + return store.state.setting.mode + }) + console.log('mode============',mode) return{ isCollapse, device, classObj, + isShowTag, + mode, handleClickOutside } } @@ -85,4 +98,12 @@ position: absolute; z-index: 999; } + .m-container-content{ + padding: 20px; + /*background: #f6f8f9;*/ + padding-top: 110px; + } + .app-main-hide-tag{ + padding-top: 80px; + } diff --git a/src/store/index.ts b/src/store/index.ts index 49562b6..1eb2d0a 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -4,6 +4,7 @@ import permission from './modules/permission' import app from './modules/app' import user from './modules/user' import tagsView from './modules/tagsView' +import setting from './modules/setting' import getters from './getters' @@ -20,7 +21,8 @@ export default createStore({ permission, app, user, - tagsView + tagsView, + setting }, getters }) diff --git a/src/store/modules/setting.ts b/src/store/modules/setting.ts new file mode 100644 index 0000000..c13b781 --- /dev/null +++ b/src/store/modules/setting.ts @@ -0,0 +1,33 @@ +import {Module} from "vuex"; + +const state = { + isShowTag: true, + mode: 'vertical', +} + +const mutations = { + SET_TAG: (state, value) => { + state.isShowTag = value + }, + SET_MODE: (state, value) => { + state.mode = value + }, +} +const actions = { + setTag({ commit }, value) { + commit('SET_TAG', value) + }, + setMode({ commit }, value) { + commit('SET_MODE', value) + }, +} + + +const setting:Module = { + namespaced:true, + state, + mutations, + actions +} + +export default setting diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss index 3eba722..5a2cdba 100644 --- a/src/styles/sidebar.scss +++ b/src/styles/sidebar.scss @@ -7,6 +7,16 @@ position: relative; } + .hideSliderLayout{ + margin-left: 0; + .el-menu--horizontal{ + border-bottom: none; + } + } + .transverseMenu{ + background-color: $menuBg; + } + .sidebar-container { transition: width 0.28s; width: $sideBarWidth !important;