mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
31 lines
679 B
Vue
31 lines
679 B
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { isClient } from '@vueuse/core'
|
|
import { useLang } from '../composables/lang'
|
|
import localeData from '../../i18n/pages/not-found.json'
|
|
|
|
const lang = useLang()
|
|
|
|
const locale = computed(() => localeData[lang.value])
|
|
|
|
const goHome = () => {
|
|
if (!isClient) return
|
|
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>
|