fix nuxt ui 参数传递错误
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
/>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="flex-1 overflow-y-auto pt-16">
|
||||
<UMain class="flex-1 overflow-y-auto">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
|
||||
<slot />
|
||||
</div>
|
||||
</main>
|
||||
</UMain>
|
||||
|
||||
<!-- Footer -->
|
||||
<AppFooter />
|
||||
@@ -47,16 +47,5 @@ const toggleSidebar = () => {
|
||||
isSidebarOpen.value = !isSidebarOpen.value
|
||||
}
|
||||
|
||||
// 监听路由变化,在移动端自动关闭侧边栏
|
||||
const route = useRoute()
|
||||
const stopWatch = watch(() => route.path, () => {
|
||||
if (isSidebarOpen.value) {
|
||||
isSidebarOpen.value = false
|
||||
}
|
||||
})
|
||||
|
||||
// 组件卸载时清理监听器
|
||||
onUnmounted(() => {
|
||||
stopWatch()
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user