feat:国际化views/404页面

This commit is contained in:
tongque 2024-05-18 09:34:27 +08:00
parent e13010f476
commit 2f7ffcb761
10 changed files with 29 additions and 16 deletions

View File

@ -35,7 +35,7 @@
@click="toUrl('https://bbs.fit2cloud.com/c/mk/11')"
></AppIcon>
</el-tooltip>
<el-dropdown v-if="false" trigger="click" type="primary">
<el-dropdown v-if="true" trigger="click" type="primary">
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item

View File

@ -1,12 +1,12 @@
import en from 'element-plus/es/locale/lang/en';
import components from './components';
import layout from './layout';
import pages from './pages';
import views from './views';
export default {
lang: 'English',
layout,
pages,
views,
components,
en,
};

View File

@ -1,4 +0,0 @@
export default {
};

View File

@ -0,0 +1,5 @@
export default {
title: "404",
message: "Unable to Access Application",
operate: "Back to Home",
};

View File

@ -0,0 +1,5 @@
import notFound from './404';
export default {
notFound,
};

View File

@ -1,12 +1,12 @@
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import components from './components';
import layout from './layout';
import pages from './pages';
import views from './views';
export default {
lang: '简体中文',
layout,
pages,
views,
components,
zhCn,
};

View File

@ -1,4 +0,0 @@
export default {
};

View File

@ -0,0 +1,5 @@
export default {
title: "404",
Message: "无法访问应用",
operate: "返回首页",
};

View File

@ -0,0 +1,5 @@
import notFound from './404';
export default {
notFound,
};

View File

@ -2,10 +2,10 @@
<el-row class="not-found-container">
<el-col class="img" :xs="0" :sm="0" :md="12" :lg="12" :xl="12"> </el-col>
<el-col class="message-container" :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="title">404</div>
<div class="message">很抱歉无法访问应用</div>
<div class="title">{{ $t('views.notFound.title')}}</div>
<div class="message">{{ $t('views.notFound.message') }}</div>
<!-- TODO 暂时不处理 -->
<!-- <div class="operate"><el-button type="primary" @click="router.push('/')">返回首页</el-button></div> -->
<!-- <div class="operate"><el-button type="primary" @click="router.push('/')">{{ $t('views.notFound.operate') }}</el-button></div> -->
</el-col>
</el-row>
</template>
@ -42,6 +42,7 @@ const router = useRouter()
}
}
}
@media only screen and (max-width: 1000px) {
.not-found-container .message-container {
text-align: center;