feat(projects): 适配移动端,修复Tab关闭图标的bug

ISSUES CLOSED: #87,#106,#109,#111
This commit is contained in:
Soybean
2022-07-12 00:02:00 +08:00
parent cec0f25c6b
commit 296b154be5
4 changed files with 16 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
import { computed } from 'vue';
import { useBreakpoints, breakpointsTailwind } from '@vueuse/core';
import { useAppStore, useThemeStore } from '@/store';
type LayoutMode = 'vertical' | 'horizontal';
@@ -7,6 +8,7 @@ type LayoutHeaderProps = Record<EnumType.ThemeLayoutMode, GlobalHeaderProps>;
export function useBasicLayout() {
const app = useAppStore();
const theme = useThemeStore();
const breakpoints = useBreakpoints(breakpointsTailwind);
const mode = computed(() => {
const vertical: LayoutMode = 'vertical';
@@ -14,6 +16,8 @@ export function useBasicLayout() {
return theme.layout.mode.includes(vertical) ? vertical : horizontal;
});
const isMobile = breakpoints.smaller('sm');
const layoutHeaderProps: LayoutHeaderProps = {
vertical: {
showLogo: false,
@@ -61,6 +65,7 @@ export function useBasicLayout() {
return {
mode,
isMobile,
headerProps,
siderVisible,
siderWidth,