perf: 简化 error 目录名称

This commit is contained in:
pany 2024-11-27 14:12:44 +08:00
parent 9a02f69692
commit cc6635a6d9
8 changed files with 25 additions and 25 deletions

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -1,10 +0,0 @@
<script lang="ts" setup>
import Svg403 from "@@/assets/images/error-page/403.svg?component" // vite-svg-loader
import ErrorPageLayout from "./components/ErrorPageLayout.vue"
</script>
<template>
<ErrorPageLayout>
<Svg403 />
</ErrorPageLayout>
</template>

View File

@ -1,10 +0,0 @@
<script lang="ts" setup>
import Svg404 from "@@/assets/images/error-page/404.svg?component" // vite-svg-loader
import ErrorPageLayout from "./components/ErrorPageLayout.vue"
</script>
<template>
<ErrorPageLayout>
<Svg404 />
</ErrorPageLayout>
</template>

10
src/pages/error/403.vue Normal file
View File

@ -0,0 +1,10 @@
<script lang="ts" setup>
import Svg403 from "@@/assets/images/error/403.svg?component" // vite-svg-loader
import Layout from "./components/Layout.vue"
</script>
<template>
<Layout>
<Svg403 />
</Layout>
</template>

10
src/pages/error/404.vue Normal file
View File

@ -0,0 +1,10 @@
<script lang="ts" setup>
import Svg404 from "@@/assets/images/error/404.svg?component" // vite-svg-loader
import Layout from "./components/Layout.vue"
</script>
<template>
<Layout>
<Svg404 />
</Layout>
</template>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="error-page"> <div class="error">
<div class="error-page-svg"> <div class="error-svg">
<slot /> <slot />
</div> </div>
<router-link to="/"> <router-link to="/">
@ -12,7 +12,7 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.error-page { .error {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -26,14 +26,14 @@ export const constantRoutes: RouteRecordRaw[] = [
}, },
{ {
path: "/403", path: "/403",
component: () => import("@/pages/error-page/403.vue"), component: () => import("@/pages/error/403.vue"),
meta: { meta: {
hidden: true hidden: true
} }
}, },
{ {
path: "/404", path: "/404",
component: () => import("@/pages/error-page/404.vue"), component: () => import("@/pages/error/404.vue"),
meta: { meta: {
hidden: true hidden: true
}, },