perf: 简化 error 目录名称
This commit is contained in:
parent
9a02f69692
commit
cc6635a6d9
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
@ -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>
|
@ -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
10
src/pages/error/403.vue
Normal 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
10
src/pages/error/404.vue
Normal 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>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="error-page">
|
||||
<div class="error-page-svg">
|
||||
<div class="error">
|
||||
<div class="error-svg">
|
||||
<slot />
|
||||
</div>
|
||||
<router-link to="/">
|
||||
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.error-page {
|
||||
.error {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
@ -26,14 +26,14 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
},
|
||||
{
|
||||
path: "/403",
|
||||
component: () => import("@/pages/error-page/403.vue"),
|
||||
component: () => import("@/pages/error/403.vue"),
|
||||
meta: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/404",
|
||||
component: () => import("@/pages/error-page/404.vue"),
|
||||
component: () => import("@/pages/error/404.vue"),
|
||||
meta: {
|
||||
hidden: true
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user