Skip to content

Commit

Permalink
feat:自动化路由
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazi7 committed Nov 6, 2024
1 parent 5200c59 commit a05cb4e
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 365 deletions.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"tailwindcss": "^3.4.14",
"typescript": "^5.5.3",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.8"
"vite": "^5.4.8",
"vite-plugin-pages": "^0.32.3"
},
"lint-staged": {
"*.(ts|vue)": [
Expand Down
36 changes: 3 additions & 33 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,7 @@
<script setup lang="ts">
import { Button } from '@/components/ui/button';
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle, } from '@/components/ui/card';
</script>
<script setup lang="ts"></script>

<template>

<Card class="Card">
<CardHeader>
<CardTitle>组件的基本导入使用</CardTitle>
<CardDescription>卡片组件的描述</CardDescription>
</CardHeader>
<CardContent>
卡片组件的内容填充区
</CardContent>
<CardFooter>
卡片组件的表尾
<Button class="absolute left-4">Button</Button>
</CardFooter>
</Card>
<RouterView></RouterView>
</template>

<style lang="scss" scoped>
.Card{
width: 300px;
height: 300px;
background-color: #fff;
margin: auto;
border-radius: 10px;
}
</style>
<style lang="scss" scoped></style>
5 changes: 5 additions & 0 deletions src/layouts/DefaultLayout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script setup lang="ts"></script>

<template></template>

<style lang="scss" scoped></style>
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createApp } from "vue";
import App from "./App.vue";
import "@/assets/styles/index.scss";
import router from "@/router";

createApp(App).mount("#app");
createApp(App).use(router).mount("#app");
5 changes: 5 additions & 0 deletions src/pages/dashboard/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script setup lang="ts"></script>

<template>控制台</template>

<style lang="scss" scoped></style>
5 changes: 5 additions & 0 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script setup lang="ts"></script>

<template>首页</template>

<style lang="scss" scoped></style>
5 changes: 5 additions & 0 deletions src/pages/message/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script setup lang="ts"></script>

<template>消息中心</template>

<style lang="scss" scoped></style>
5 changes: 5 additions & 0 deletions src/pages/profile/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script setup lang="ts"></script>

<template>用户中心</template>

<style lang="scss" scoped></style>
5 changes: 5 additions & 0 deletions src/pages/recruitment/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script setup lang="ts"></script>

<template>招新</template>

<style lang="scss" scoped></style>
7 changes: 7 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createRouter, createWebHistory } from "vue-router";
import routes from "~pages";
const router = createRouter({
history: createWebHistory(),
routes,
});
export default router;
94 changes: 0 additions & 94 deletions src/shared/loading-status/LoadingLogin.vue

This file was deleted.

88 changes: 0 additions & 88 deletions src/shared/loading-status/LoadingPage.vue

This file was deleted.

35 changes: 0 additions & 35 deletions src/shared/loading-status/NoData.vue

This file was deleted.

Loading

0 comments on commit a05cb4e

Please sign in to comment.