update layout
This commit is contained in:
@@ -145,11 +145,10 @@ const breadcrumbItems = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a-layout class="min-h-screen">
|
<div class="min-h-screen flex flex-col">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<a-layout-header
|
<header
|
||||||
class="fixed top-0 w-full z-10 flex items-center justify-between px-4"
|
class="fixed top-0 w-full z-20 flex items-center justify-between px-4 bg-[#001529] h-16"
|
||||||
style="height: 64px; line-height: 64px"
|
|
||||||
>
|
>
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<Brand size="small" :show-app-name="!collapsed" />
|
<Brand size="small" :show-app-name="!collapsed" />
|
||||||
@@ -182,17 +181,16 @@ const breadcrumbItems = computed(() => {
|
|||||||
</a-menu>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</a-layout-header>
|
</header>
|
||||||
|
|
||||||
<a-layout class="mt-16">
|
<div class="flex pt-16 min-h-screen">
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<a-layout-sider
|
<aside
|
||||||
v-model:collapsed="collapsed"
|
class="fixed left-0 top-16 bottom-0 z-10 overflow-y-auto bg-[#001529] transition-[width] duration-200"
|
||||||
:trigger="null"
|
:style="{ width: collapsed ? '80px' : '200px' }"
|
||||||
collapsible
|
|
||||||
class="fixed left-0 top-16 bottom-0 overflow-y-auto"
|
|
||||||
>
|
>
|
||||||
<a-menu
|
<a-menu
|
||||||
|
:inline-collapsed="collapsed"
|
||||||
:selected-keys="selectedKeys"
|
:selected-keys="selectedKeys"
|
||||||
v-model:open-keys="openKeys"
|
v-model:open-keys="openKeys"
|
||||||
mode="inline"
|
mode="inline"
|
||||||
@@ -214,16 +212,14 @@ const breadcrumbItems = computed(() => {
|
|||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</a-layout-sider>
|
</aside>
|
||||||
|
|
||||||
<!-- Content + Footer -->
|
<!-- Content + Footer -->
|
||||||
<a-layout
|
<div
|
||||||
:style="{
|
class="flex flex-col flex-1 min-h-[calc(100vh-4rem)]"
|
||||||
marginLeft: collapsed ? '80px' : '200px',
|
:style="{ marginLeft: collapsed ? '80px' : '200px', transition: 'margin-left 0.2s' }"
|
||||||
transition: 'margin-left 0.2s',
|
|
||||||
}"
|
|
||||||
>
|
>
|
||||||
<a-layout-content class="p-6">
|
<main class="flex-1 overflow-y-auto p-6">
|
||||||
<a-breadcrumb class="mb-4">
|
<a-breadcrumb class="mb-4">
|
||||||
<a-breadcrumb-item v-for="item in breadcrumbItems" :key="item.path">
|
<a-breadcrumb-item v-for="item in breadcrumbItems" :key="item.path">
|
||||||
<router-link v-if="item.path !== route.path" :to="item.path">
|
<router-link v-if="item.path !== route.path" :to="item.path">
|
||||||
@@ -233,18 +229,12 @@ const breadcrumbItems = computed(() => {
|
|||||||
</a-breadcrumb-item>
|
</a-breadcrumb-item>
|
||||||
</a-breadcrumb>
|
</a-breadcrumb>
|
||||||
<slot />
|
<slot />
|
||||||
</a-layout-content>
|
</main>
|
||||||
|
|
||||||
<a-layout-footer class="text-center text-gray-500">
|
<footer class="text-center text-gray-500 py-6 bg-[#f5f5f5]">
|
||||||
© 2026 DataHub - 数据管理平台
|
© 2026 DataHub - 数据管理平台
|
||||||
</a-layout-footer>
|
</footer>
|
||||||
</a-layout>
|
</div>
|
||||||
</a-layout>
|
</div>
|
||||||
</a-layout>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
:deep(.ant-layout-sider) {
|
|
||||||
z-index: 9;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user