Browse Source

fix: 修复移动端左侧菜单无法显示的问题

master
insistence 7 months ago
parent
commit
d0e82b56ab
  1. 5
      ruoyi-fastapi-frontend/src/layout/index.vue

5
ruoyi-fastapi-frontend/src/layout/index.vue

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

Loading…
Cancel
Save