wip: 临时提交

This commit is contained in:
Ray.Hao
2025-05-23 09:51:13 +08:00
parent 54b2164d25
commit af30411317
14 changed files with 809 additions and 308 deletions

27
src/layouts/index.vue Normal file
View File

@@ -0,0 +1,27 @@
<template>
<component :is="currentLayoutComponent" />
</template>
<script setup lang="ts">
import { computed } from "vue";
import { useLayout } from "./composables/useLayout";
import LeftSideLayout from "./components/LeftSideLayout/index.vue";
import TopMenuLayout from "./components/TopMenuLayout/index.vue";
import MixMenuLayout from "./components/MixMenuLayout/index.vue";
import { LayoutMode } from "@/enums/settings/layout.enum";
const { currentLayout } = useLayout();
// 根据当前布局模式选择对应的组件
const currentLayoutComponent = computed(() => {
switch (currentLayout.value) {
case LayoutMode.TOP:
return TopMenuLayout;
case LayoutMode.MIX:
return MixMenuLayout;
case LayoutMode.LEFT:
default:
return LeftSideLayout;
}
});
</script>