fix屏幕缩小侧边栏点击弹出bug

This commit is contained in:
不做码农 2022-05-21 11:06:52 +08:00
parent 495fc85b78
commit 740ee6bc89

View File

@ -56,11 +56,11 @@ const WIDTH = 992 // refer to Bootstrap's responsive design
watchEffect(() => {
if (device.value === 'mobile' && sidebar.value.opened) {
store.dispatch('app/closeSideBar')
// store.dispatch('app/closeSideBar')
}
if (width.value - 1 < WIDTH) {
store.dispatch('app/toggleDevice', 'mobile')
store.dispatch('app/closeSideBar')
// store.dispatch('app/closeSideBar')
} else {
store.dispatch('app/toggleDevice', 'desktop')
}