-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy patherror.vue
57 lines (51 loc) · 922 Bytes
/
error.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<template>
<div>
<h1 class="error__title">
{{ t("notfound") }}
</h1>
<h2><a href="/">{{ t("returnToIndex") }}</a></h2>
</div>
</template>
<i18n lang="json">
{
"en": {
"notfound": "This page is not found",
"returnToIndex": "Return to index"
},
"ja": {
"notfound": "このページは存在しません",
"returnToIndex": "トップページへ戻る"
},
"zh-CN": {
"notfound": "页面不存在",
"returnToIndex": "返回到首页"
}
}
</i18n>
<script setup>
defineProps({
error: {
type: Object,
required: true,
},
});
const { t } = useI18n({
useScope: "local",
});
</script>
<style lang="scss" scoped>
@use "~/assets/styles/variables.scss" as vars;
h1, h2 {
display: block;
font-weight: 300;
color: vars.$color-dark;
letter-spacing: 1px;
text-align: center;
}
.error {
&__title {
font-size: 32px;
margin: 1vw;
}
}
</style>