style: error页面多语言
This commit is contained in:
@@ -1,19 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from 'vue-router';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-result
|
||||
status="403"
|
||||
title="没有访问权限"
|
||||
sub-title="请不要进行非法操作,您可以返回主页面或返回"
|
||||
:title="t('views.error.err403.ttile')"
|
||||
:sub-title="t('views.error.err403.subTitle')"
|
||||
>
|
||||
<template #extra>
|
||||
<RouterLink :to="{ name: 'Index' }" :replace="true">
|
||||
<a-button type="primary"> 返回首页 </a-button>
|
||||
<a-button type="primary">
|
||||
{{ t('views.error.err403.backHome') }}
|
||||
</a-button>
|
||||
</RouterLink>
|
||||
<a-button type="default" @click="() => router.back()"> 返回 </a-button>
|
||||
<a-button type="default" @click="() => router.back()">
|
||||
{{ t('views.error.err403.back') }}
|
||||
</a-button>
|
||||
</template>
|
||||
</a-result>
|
||||
</template>
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-result
|
||||
status="404"
|
||||
title="找不到匹配页面"
|
||||
sub-title="对不起,您正在寻找的页面不存在。"
|
||||
:title="t('views.error.err404.ttile')"
|
||||
:sub-title="t('views.error.err404.subTitle')"
|
||||
>
|
||||
<template #extra>
|
||||
<RouterLink :to="{ name: 'Index' }" :replace="true">
|
||||
<a-button type="primary"> 返回首页 </a-button>
|
||||
<a-button type="primary">
|
||||
{{ t('views.error.err404.backHome') }}
|
||||
</a-button>
|
||||
</RouterLink>
|
||||
</template>
|
||||
<a-typography>
|
||||
<a-typography-title> 找不到网页? </a-typography-title>
|
||||
<a-typography-title>
|
||||
{{ t('views.error.err404.tipTitle') }}
|
||||
</a-typography-title>
|
||||
<a-typography-paragraph>
|
||||
1. 尝试检查URL的错误,然后按浏览器上的刷新按钮。
|
||||
1. {{ t('views.error.err404.paragraph') }}
|
||||
</a-typography-paragraph>
|
||||
<a-typography-paragraph>
|
||||
2. 尝试在我们的应用程序中找到其他内容。
|
||||
2. {{ t('views.error.err404.paragraph1') }}
|
||||
</a-typography-paragraph>
|
||||
</a-typography>
|
||||
</a-result>
|
||||
|
||||
Reference in New Issue
Block a user