diff --git a/src/views/Home/content/aside/MainPageAside.vue b/src/views/Home/content/aside/MainPageAside.vue index 2b1de29f..9712e9c6 100644 --- a/src/views/Home/content/aside/MainPageAside.vue +++ b/src/views/Home/content/aside/MainPageAside.vue @@ -7,6 +7,10 @@ import { Icon } from '@iconify/vue' import { ref } from 'vue' // 用户点击项目跳转 import router from '@/router' +import { is } from 'dom7' + +// 单个 item 样式 +const itemStyle = {} const handleClick = () => { router.push('/rank') @@ -15,15 +19,15 @@ const handleClick = () => { // localStorage.setItem('KUNGalgameMainPageAsideBar', 'true') // const asideBarStatus = // localStorage.getItem('KUNGalgameMainPageAsideBar') || true -const topic = ref(true) -const asideWidth = ref('240px') +const isActive = ref(false) +const asideWidth = ref('40px') const handleFold = () => { - if (topic.value) { + if (isActive.value) { asideWidth.value = '40px' } else { asideWidth.value = '240px' } - topic.value = !topic.value + isActive.value = !isActive.value } @@ -33,13 +37,22 @@ const handleFold = () => { -
+
-
+
@@ -53,8 +66,8 @@ const handleFold = () => {
帖子池
- - + +
@@ -75,10 +88,7 @@ const handleFold = () => { } /* 侧边栏交互 */ .nav-aside { - width: 100%; - height: 1px; - /* 折叠区相当于侧边栏的占比 */ - flex-grow: 1; + height: 38px; /* 内容居中(折叠左侧区域) */ display: flex; justify-content: center; @@ -89,11 +99,6 @@ const handleFold = () => { color: @kungalgame-font-color-3; cursor: pointer; } -@media (max-width: 50px) { - .nav-aside { - background-color: aqua; - } -} /* 侧边栏功能区 */ .item-box { width: 100%;