feat: 首页调整

This commit is contained in:
DEV_DSW
2025-12-22 16:34:15 +08:00
parent 3b02e08be6
commit 3396c35bbb
5 changed files with 51 additions and 7 deletions

View File

@@ -23,9 +23,9 @@
<script setup lang="ts">
import { ref } from 'vue'
import { menus } from '@constant/menus'
import { useRouter } from "vue-router";
import { useRouter } from "vue-router"
const router = useRouter();
const router = useRouter()
const currentId = ref(1)
const handleClick = async (item: any) => {

View File

@@ -14,11 +14,11 @@
<TaskList />
</div>
<Menus />
<SideMenus />
</div>
</template>
<script setup lang="ts" name="Layout">
import TaskList from '@renderer/components/TaskList/index.vue'
import Menus from '@renderer/components/Menus/index.vue'
import SideMenus from '@renderer/components/SideMenus/index.vue'
</script>

View File

@@ -0,0 +1,38 @@
import { createApp, type Plugin } from "vue"
import errorHandler from '@utils/errorHandler'
// 引入 Element Plus 组件库
import ElementPlus from 'element-plus'
import locale from 'element-plus/es/locale/lang/zh-cn'
// 引入 i18n 插件
import i18n from '@renderer/i18n'
import Home from './index.vue'
// 样式文件隔离
import '@renderer/styles/index.css'
import 'element-plus/dist/index.css'
// 引入全局组件
import HeaderBar from '@components/HeaderBar/index.vue'
import DragRegion from '@components/DragRegion/index.vue'
const components: Plugin = (app) => {
app.component('HeaderBar', HeaderBar);
app.component('DragRegion', DragRegion);
}
// 创建 Vue 应用实例
const app = createApp(Home);
const pinia = createPinia();
// 使用 Pinia 状态管理
app.use(pinia);
app.use(ElementPlus, { locale })
app.use(components)
app.use(i18n)
app.use(errorHandler)
// 挂载应用到 DOM
app.mount("#app");

View File

@@ -1,6 +1,12 @@
<template>
<div class="bg-white box-border w-full h-full rounded-[16px] flex">
首页
<div class="bg-gray-100 h-screen flex flex-col">
<header-bar>
<drag-region class="w-full" />
</header-bar>
<main class="box-border rounded-[16px]">
</main>
</div>
</template>