mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 引入soybean-admin-tab、去除vite-plugin-svg-icons,用unplugin-icons实现自定义svg的iconify写法、代码优化
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="flex-col-center wh-full">
|
||||
<div class="w-400px h-400px text-primary">
|
||||
<component :is="active" />
|
||||
<div class="text-400px text-primary">
|
||||
<icon-custom-no-permission v-if="type === '403'" />
|
||||
<icon-custom-not-found v-if="type === '404'" />
|
||||
<icon-custom-service-error v-if="type === '500'" />
|
||||
</div>
|
||||
<router-link :to="{ name: routeHomePath }">
|
||||
<n-button type="primary">回到首页</n-button>
|
||||
@ -10,9 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import type { Component } from 'vue';
|
||||
import { SvgNoPermission, SvgNotFound, SvgServiceError } from '@/components';
|
||||
import { routeName } from '@/router';
|
||||
|
||||
type ExceptionType = '403' | '404' | '500';
|
||||
@ -22,18 +21,8 @@ interface Props {
|
||||
type: ExceptionType;
|
||||
}
|
||||
|
||||
type ExceptionComponent = Record<ExceptionType, Component>;
|
||||
|
||||
const props = defineProps<Props>();
|
||||
defineProps<Props>();
|
||||
|
||||
const routeHomePath = routeName('root');
|
||||
|
||||
const exceptions: ExceptionComponent = {
|
||||
'403': SvgNoPermission,
|
||||
'404': SvgNotFound,
|
||||
'500': SvgServiceError
|
||||
};
|
||||
|
||||
const active = computed(() => exceptions[props.type]);
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div class="w-360px">
|
||||
<header class="flex-y-center justify-between">
|
||||
<div class="w-70px h-70px rounded-35px overflow-hidden">
|
||||
<system-logo class="wh-full text-primary" :fill="true" />
|
||||
<system-logo class="text-70px text-primary" :fill="true" />
|
||||
</div>
|
||||
<n-gradient-text type="primary" :size="28">{{ title }}</n-gradient-text>
|
||||
</header>
|
||||
|
Reference in New Issue
Block a user