mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
29 lines
615 B
Vue
29 lines
615 B
Vue
|
<script setup lang="ts">
|
||
|
import { computed } from 'vue'
|
||
|
import { useLang } from '../composables/lang'
|
||
|
import localeData from '../../i18n/pages/not-found.json'
|
||
|
|
||
|
const lang = useLang()
|
||
|
|
||
|
const locale = computed(() => localeData[lang.value])
|
||
|
|
||
|
const goHome = () => {
|
||
|
window.location.href = `/${lang.value}/`
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<el-result icon="error" :title="locale.title" :sub-title="locale.desc">
|
||
|
<template #extra>
|
||
|
<el-button @click="goHome">{{ locale['button-title'] }}</el-button>
|
||
|
</template>
|
||
|
</el-result>
|
||
|
</template>
|
||
|
|
||
|
<style scoped>
|
||
|
.el-result {
|
||
|
height: 100vh;
|
||
|
width: 100vw;
|
||
|
}
|
||
|
</style>
|