init: basic structure

This commit is contained in:
YunYouJun
2022-04-13 22:41:22 +08:00
parent f77549b1cd
commit c355d51874
50 changed files with 7682 additions and 0 deletions

17
src/layouts/404.vue Normal file
View File

@@ -0,0 +1,17 @@
<script setup lang="ts">
const router = useRouter()
</script>
<template>
<main p="x4 y10" text="center green-700 dark:gray-200">
<div text-4xl>
<div i-ri-error-warning-line inline-block />
</div>
<RouterView />
<div>
<button btn text-sm m="3 t8" @click="router.back()">
返回
</button>
</div>
</main>
</template>

14
src/layouts/README.md Normal file
View File

@@ -0,0 +1,14 @@
## Layouts
Vue components in this dir are used as layouts.
By default, `default.vue` will be used unless an alternative is specified in the route meta.
With [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) and [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts), you can specify the layout in the page's SFCs like this:
```html
<route lang="yaml">
meta:
layout: home
</route>
```

7
src/layouts/default.vue Normal file
View File

@@ -0,0 +1,7 @@
<template>
<main class="px-4 text-center text-gray-700 dark:text-gray-200">
<Menu />
<RouterView />
<BaseFooter />
</main>
</template>