This commit is contained in:
qsh
2024-09-20 11:21:05 +08:00
parent a81d21dd3b
commit 83d04e7333
5 changed files with 31 additions and 16 deletions

View File

@@ -22,13 +22,13 @@ onMounted(() => {
appStore.setCssVarTheme()
})
const { width } = useWindowSize()
const { width, height } = useWindowSize()
// 监听窗口变化
watch(
() => width.value,
(width: number) => {
if (width < 768) {
if (width < 768 || height.value < 450) {
!appStore.getMobile ? appStore.setMobile(true) : undefined
setCssVar('--left-menu-min-width', '0')
appStore.setCollapse(true)