ruoyi-plus-soybean/src/layouts/basic-layout/index.vue

52 lines
1.5 KiB
Vue
Raw Normal View History

2022-01-08 20:49:21 +08:00
<template>
2022-04-27 22:27:46 +08:00
<admin-layout
2022-01-08 20:49:21 +08:00
:mode="mode"
:scroll-mode="theme.scrollMode"
:scroll-el-id="app.scrollElId"
:full-content="app.contentFull"
:fixed-top="theme.fixedHeaderAndTab"
2022-01-08 20:49:21 +08:00
:header-height="theme.header.height"
:tab-visible="theme.tab.visible"
:tab-height="theme.tab.height"
:content-class="app.disableMainXScroll ? 'overflow-x-hidden' : ''"
2022-01-08 20:49:21 +08:00
:sider-visible="siderVisible"
:sider-collapse="app.siderCollapse"
2022-01-08 20:49:21 +08:00
:sider-width="siderWidth"
:sider-collapsed-width="siderCollapsedWidth"
:footer-visible="theme.footer.visible"
:fixed-footer="theme.footer.fixed"
2022-01-08 20:49:21 +08:00
>
<template #header>
<global-header v-bind="headerProps" />
2022-01-08 20:49:21 +08:00
</template>
<template #tab>
<global-tab />
</template>
<template #sider>
<global-sider />
</template>
<global-content />
2022-01-08 20:49:21 +08:00
<template #footer>
<global-footer />
</template>
2022-04-27 22:27:46 +08:00
</admin-layout>
<n-back-top :key="theme.scrollMode" :listen-to="`#${app.scrollElId}`" class="z-100" />
2022-01-08 20:49:21 +08:00
<setting-drawer />
</template>
<script setup lang="ts">
import { AdminLayout } from '@soybeanjs/vue-materials';
2022-01-08 20:49:21 +08:00
import { useAppStore, useThemeStore } from '@/store';
import { useBasicLayout } from '@/composables';
import { GlobalContent, GlobalFooter, GlobalHeader, GlobalSider, GlobalTab, SettingDrawer } from '../common';
2022-01-08 20:49:21 +08:00
defineOptions({ name: 'BasicLayout' });
2022-01-08 20:49:21 +08:00
const app = useAppStore();
const theme = useThemeStore();
const { mode, headerProps, siderVisible, siderWidth, siderCollapsedWidth } = useBasicLayout();
2022-01-08 20:49:21 +08:00
</script>
2022-01-08 20:49:21 +08:00
<style scoped></style>