Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-21 11:29:20 +08:00

refactor: error page

This commit is contained in:
pany 2022-10-12 17:29:38 +08:00
parent 9a7790f05b
commit deb2d3da13
4 changed files with 32 additions and 31 deletions

View File

@ -1,16 +1,10 @@
<script lang="ts" setup>
import ErrorPageLayout from "./components/ErrorPageLayout.vue"
import Svg403 from "@/assets/error-page/403.svg?component" // vite-svg-loader
</script>
<template>
<div class="error-page">
<Svg403 class="error-page-svg" />
<router-link to="/">
<el-button type="primary">回到首页</el-button>
</router-link>
</div>
<ErrorPageLayout>
<Svg403 />
</ErrorPageLayout>
</template>
<style lang="scss" scoped>
@import "./index.scss";
</style>

View File

@ -1,16 +1,10 @@
<script lang="ts" setup>
import ErrorPageLayout from "./components/ErrorPageLayout.vue"
import Svg404 from "@/assets/error-page/404.svg?component" // vite-svg-loader
</script>
<template>
<div class="error-page">
<Svg404 class="error-page-svg" />
<router-link to="/">
<el-button type="primary">回到首页</el-button>
</router-link>
</div>
<ErrorPageLayout>
<Svg404 />
</ErrorPageLayout>
</template>
<style lang="scss" scoped>
@import "./index.scss";
</style>

View File

@ -0,0 +1,24 @@
<template>
<div class="error-page">
<div class="error-page-svg">
<slot />
</div>
<router-link to="/">
<el-button type="primary">回到首页</el-button>
</router-link>
</div>
</template>
<style lang="scss" scoped>
.error-page {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
&-svg {
width: 400px;
margin-bottom: 50px;
}
}
</style>

View File

@ -1,11 +0,0 @@
.error-page {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
&-svg {
width: 400px;
margin-bottom: 50px;
}
}