mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-14 20:53:41 +08:00
feat(projects): 适配移动端,修复Tab关闭图标的bug
ISSUES CLOSED: #87,#106,#109,#111
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user