feat: add 404 page

This commit is contained in:
thehrz 2023-10-03 20:53:45 +08:00
parent 43df7deea8
commit be77944895
Signed by: thehrz
GPG Key ID: C84CBCE7D5F88855
3 changed files with 16 additions and 6 deletions

View File

@ -11,6 +11,8 @@ server {
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/json; gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/json;
gzip_disable "MSIE [1-6]\."; gzip_disable "MSIE [1-6]\.";
gzip_vary on; gzip_vary on;
error_page 404 /404.html;
location / { location / {
root /usr/local/nginx/html/; root /usr/local/nginx/html/;

View File

@ -11,12 +11,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
defineOptions({ defineProps<{
name: "AButton", to?: string
})
const props = defineProps<{
to: string
icon?: string icon?: string
}>() }>()
</script> </script>

12
src/pages/404.vue Normal file
View File

@ -0,0 +1,12 @@
<script setup lang="ts">
import { useRouter } from "vue-router"
const router = useRouter()
</script>
<template>
<section class="flex flex-col items-center">
<h1 class="m-5">404</h1>
<Button @click="router.back()">Back</Button>
</section>
</template>