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 = () => {
-