mirror of
https://github.com/yangzongzhuan/RuoYi-Vue3.git
synced 2025-09-27 23:02:41 +00:00
修复移动端左侧菜单无法显示问题
This commit is contained in:
@@ -40,10 +40,13 @@ const classObj = computed(() => ({
|
|||||||
const { width, height } = useWindowSize();
|
const { width, height } = useWindowSize();
|
||||||
const WIDTH = 992; // refer to Bootstrap's responsive design
|
const WIDTH = 992; // refer to Bootstrap's responsive design
|
||||||
|
|
||||||
watchEffect(() => {
|
watch(() => device.value, () => {
|
||||||
if (device.value === 'mobile' && sidebar.value.opened) {
|
if (device.value === 'mobile' && sidebar.value.opened) {
|
||||||
useAppStore().closeSideBar({ withoutAnimation: false })
|
useAppStore().closeSideBar({ withoutAnimation: false })
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
if (width.value - 1 < WIDTH) {
|
if (width.value - 1 < WIDTH) {
|
||||||
useAppStore().toggleDevice('mobile')
|
useAppStore().toggleDevice('mobile')
|
||||||
useAppStore().closeSideBar({ withoutAnimation: true })
|
useAppStore().closeSideBar({ withoutAnimation: true })
|
||||||
|
Reference in New Issue
Block a user