This commit is contained in:
aaron 2025-03-18 09:36:28 +08:00
parent 5479099dba
commit 04612a57b5
2 changed files with 89 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<a-layout class="layout"> <a-layout class="layout">
<a-layout-sider v-model:collapsed="collapsed" :trigger="null" collapsible> <a-layout-sider v-model:collapsed="collapsed" :trigger="null" collapsible class="layout-sider">
<div class="logo"> <div class="logo">
<h1 class="logo-text">蜂快 · 运营系统</h1> <h1 class="logo-text">蜂快 · 运营系统</h1>
</div> </div>
@ -134,8 +134,8 @@
</a-sub-menu> </a-sub-menu>
</a-menu> </a-menu>
</a-layout-sider> </a-layout-sider>
<a-layout> <a-layout class="site-layout">
<a-layout-header style="background: #fff; padding: 0"> <a-layout-header class="site-layout-header">
<div class="header-content"> <div class="header-content">
<div class="header-left"> <div class="header-left">
<menu-unfold-outlined <menu-unfold-outlined
@ -175,10 +175,10 @@
</div> </div>
</div> </div>
</a-layout-header> </a-layout-header>
<a-layout-content <a-layout-content class="site-layout-content">
:style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }" <div class="content-container">
> <router-view></router-view>
<router-view></router-view> </div>
</a-layout-content> </a-layout-content>
</a-layout> </a-layout>
</a-layout> </a-layout>
@ -513,7 +513,63 @@ export default defineComponent({
<style scoped> <style scoped>
.layout { .layout {
min-height: 100vh; min-height: 100vh;
height: 100vh;
display: flex;
overflow: hidden;
} }
.layout-sider {
position: fixed;
left: 0;
top: 0;
bottom: 0;
z-index: 10;
height: 100vh;
overflow-y: auto;
}
.site-layout {
margin-left: 200px;
transition: margin-left 0.2s;
height: 100vh;
display: flex;
flex-direction: column;
}
:deep(.ant-layout-sider-collapsed) + .site-layout {
margin-left: 80px;
}
.site-layout-header {
background: #fff;
padding: 0;
position: fixed;
top: 0;
right: 0;
left: 200px;
z-index: 9;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
transition: left 0.2s;
}
:deep(.ant-layout-sider-collapsed) ~ .site-layout .site-layout-header {
left: 80px;
}
.site-layout-content {
margin-top: 64px;
flex: 1;
overflow-y: auto;
padding: 24px 16px;
}
.content-container {
background: #fff;
padding: 24px;
min-height: 280px;
border-radius: 2px;
}
.trigger { .trigger {
font-size: 18px; font-size: 18px;
line-height: 64px; line-height: 64px;
@ -521,9 +577,11 @@ export default defineComponent({
cursor: pointer; cursor: pointer;
transition: color 0.3s; transition: color 0.3s;
} }
.trigger:hover { .trigger:hover {
color: #1890ff; color: #1890ff;
} }
.logo { .logo {
height: 64px; height: 64px;
margin: 16px; margin: 16px;
@ -533,6 +591,7 @@ export default defineComponent({
overflow: hidden; overflow: hidden;
transition: all 0.3s; transition: all 0.3s;
} }
.logo-text { .logo-text {
color: #fff; color: #fff;
font-size: 18px; font-size: 18px;
@ -543,42 +602,51 @@ export default defineComponent({
text-align: center; text-align: center;
transition: all 0.3s; transition: all 0.3s;
} }
:deep(.ant-layout-sider-collapsed) .logo-text { :deep(.ant-layout-sider-collapsed) .logo-text {
display: none; display: none;
} }
.header-content { .header-content {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 100%; height: 100%;
} }
.header-left { .header-left {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.breadcrumb-container { .breadcrumb-container {
margin-left: 16px; margin-left: 16px;
height: 64px; height: 64px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.page-breadcrumb { .page-breadcrumb {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
} }
.breadcrumb-item { .breadcrumb-item {
display: inline-block; display: inline-block;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-weight: 500; font-weight: 500;
} }
.breadcrumb-separator { .breadcrumb-separator {
margin: 0 8px; margin: 0 8px;
color: #8c8c8c; color: #8c8c8c;
} }
.header-right { .header-right {
margin-right: 24px; margin-right: 24px;
} }
.ant-dropdown-link { .ant-dropdown-link {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
cursor: pointer; cursor: pointer;

View File

@ -363,9 +363,7 @@ export default defineComponent({
<style scoped> <style scoped>
.dashboard { .dashboard {
padding: 24px;
background: #fff; background: #fff;
min-height: 400px;
} }
.data-overview { .data-overview {
@ -583,6 +581,7 @@ export default defineComponent({
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
flex-shrink: 0;
} }
.section-title { .section-title {
@ -600,7 +599,19 @@ export default defineComponent({
} }
.deliveryman-table { .deliveryman-table {
margin-top: 16px; :deep(.ant-table-wrapper) {
}
:deep(.ant-table-container) {
display: flex;
flex-direction: column;
}
:deep(.ant-table) {
}
:deep(.ant-table-content) {
}
:deep(.ant-table-thead > tr > th) { :deep(.ant-table-thead > tr > th) {
background-color: #f5f5f5; background-color: #f5f5f5;