2025-01-23 01:10:59 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
class="basic-layout"
|
|
|
|
:class="{
|
|
|
|
hideSider: !SettingStore.isCollapse,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<Sider />
|
|
|
|
<div class="basic-layout-container">
|
|
|
|
<Header />
|
|
|
|
<Main />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="layout">
|
|
|
|
import { useSettingStore } from '@/store/modules/setting';
|
|
|
|
|
|
|
|
import Sider from './component/Sider';
|
|
|
|
import Header from './component/Header';
|
|
|
|
import Main from './component/Main';
|
|
|
|
const SettingStore = useSettingStore();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.basic-layout {
|
|
|
|
width: 100%;
|
|
|
|
min-width: 1200px;
|
2025-02-26 17:03:50 +08:00
|
|
|
height: 100%;
|
2025-01-23 01:10:59 +00:00
|
|
|
&.hideSider {
|
|
|
|
:deep(.layout-sider) {
|
|
|
|
width: 60px !important;
|
|
|
|
}
|
|
|
|
.basic-layout-container {
|
|
|
|
margin-left: 60px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-container {
|
|
|
|
position: relative;
|
|
|
|
margin-left: 210px;
|
2025-02-26 17:03:50 +08:00
|
|
|
height: 100%;
|
2025-01-23 01:10:59 +00:00
|
|
|
transition: margin-left 0.28s;
|
2025-02-26 17:03:50 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
@include flex-column;
|
2025-01-23 01:10:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|