!78 修复移动端模式,菜单无法显示问题

Merge pull request !78 from Po/N/A
This commit is contained in:
橙子
2024-11-15 13:33:22 +00:00
committed by Gitee

View File

@@ -41,12 +41,12 @@ const { width, height } = useWindowSize();
const WIDTH = 992; // refer to Bootstrap's responsive design
watchEffect(() => {
if (device.value === 'mobile' && sidebar.value.opened) {
useAppStore().closeSideBar({ withoutAnimation: false })
}
//if (device.value === 'mobile' && sidebar.value.opened) {
// useAppStore().closeSideBar({ withoutAnimation: false })
// }
if (width.value - 1 < WIDTH) {
useAppStore().toggleDevice('mobile')
useAppStore().closeSideBar({ withoutAnimation: true })
// useAppStore().closeSideBar({ withoutAnimation: true })
} else {
useAppStore().toggleDevice('desktop')
}