Skip to content

Commit

Permalink
主菜单
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 committed May 23, 2024
1 parent 563be14 commit 1706a27
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 17 deletions.
15 changes: 9 additions & 6 deletions front_end/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
</div>
</el-menu-item>
<el-menu-item index="/ranking">
<div class="header">排行榜</div>
<div class="header">{{ $t('menu.ranking') }}</div>
</el-menu-item>
<el-menu-item index="/video">
<div class="header">录像</div>
<div class="header">{{ $t('menu.video') }}</div>
</el-menu-item>
<el-menu-item index="/world">
<div class="header">统计</div>
<div class="header">{{ $t('menu.world') }}</div>
</el-menu-item>
<el-menu-item index="/guide">
<div class="header">教程</div>
<div class="header">{{ $t('menu.guide') }}</div>
</el-menu-item>
<el-menu-item index="/score">
<div class="header">积分</div>
<div class="header">{{ $t('menu.score') }}</div>
</el-menu-item>
<el-menu-item :index="player_url" :disabled="store.user.id == 0" @click="store.player = store.user;">
<div class="header">我的地盘</div>
<div class="header">{{ $t('menu.profile') }}</div>
</el-menu-item>
<LanguagePicker/>
<div
Expand Down Expand Up @@ -76,6 +76,9 @@ import useCurrentInstance from "@/utils/common/useCurrentInstance";
import { useUserStore } from './store'
const store = useUserStore()
import { useI18n } from 'vue-i18n';
const t = useI18n();
const { proxy } = useCurrentInstance();
const logo_1 = ref(require('@/assets/logo.png'))
const logo_2 = ref(require('@/assets/logo2.png'))
Expand Down
2 changes: 1 addition & 1 deletion front_end/src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ import ValidCode from "@/components/ValidCode.vue";
import { genFileId, ElMessage } from 'element-plus'
import { useUserStore } from '../store'
const store = useUserStore()
import { useI18n } from 'vue-i18n';
import { useI18n } from 'vue-i18n';
const t = useI18n();
const AXIOS_BASE_URL = process.env.VUE_APP_BASE_API;
Expand Down
12 changes: 9 additions & 3 deletions front_end/src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ export type LocaleConfig = LocaleMessage<VueMessageType> & {
},
menu: {
ranking: string,
statistics: string,
profile: string,
video: string,
world: string,
guide: string,
score: string,
profile: string,
welcome: string,
login: string,
register: string
register: string,
downloads: string,
links: string,
team: string
},
login: {
title: string,
Expand Down
12 changes: 9 additions & 3 deletions front_end/src/i18n/locales/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ export const dev: LocaleConfig = {
},
menu: {
ranking: 'menu.ranking',
statistics: 'menu.statistics',
profile: 'menu.profile',
video: 'menu.video',
world: 'menu.world',
guide: 'menu.guide',
score: 'menu.score',
profile: 'menu.profile',
welcome: 'menu.welcome{"{"}0{"}"}',
login: 'menu.login',
register: 'menu.register'
register: 'menu.register',
downloads: 'menu.downloads',
links: 'menu.links',
team: 'menu.team'
},
login: {
title: 'login.title',
Expand Down
14 changes: 10 additions & 4 deletions front_end/src/i18n/locales/zh-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ export const zhCn: LocaleConfig = {
time: '用时'
},
menu: {
ranking: '排行',
statistics: '统计',
ranking: '排行榜',
video: '录像',
world: '统计',
guide: '教程',
score: '积分',
profile: '我的',
video: '录像库',
welcome: '欢迎您,{0}!',
login: '登录',
register: '注册'
register: '注册',
downloads: '软件下载',
links: '友链',
team: '团队'
},
login: {
title: '欢迎登录',
Expand Down

0 comments on commit 1706a27

Please sign in to comment.