mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat:layout部分国际化
This commit is contained in:
parent
6f15ebba05
commit
63caa3631a
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
<template>
|
||||
<div
|
||||
class="menu-item-container flex-center h-full"
|
||||
:class="isActive ? 'active' : ''"
|
||||
@click="router.push({ name: menu.name })"
|
||||
>
|
||||
<div class="menu-item-container flex-center h-full" :class="isActive ? 'active' : ''"
|
||||
@click="router.push({ name: menu.name })">
|
||||
<!-- <div class="icon">
|
||||
<AppIcon :iconName="menu.meta ? (menu.meta.icon as string) : '404'" />
|
||||
</div> -->
|
||||
<div class="title">{{ menu.meta?.title }}</div>
|
||||
<div class="title">
|
||||
{{
|
||||
$te(`layout.topbar.MenuItem.${String(props.menu.name)}`)
|
||||
? $t(`layout.topbar.MenuItem.${String(props.menu.name)}`)
|
||||
: menu.meta?.title
|
||||
}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -31,11 +35,13 @@ const isActive = computed(() => {
|
|||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
|
||||
.icon {
|
||||
font-size: 15px;
|
||||
margin-right: 5px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
|
@ -43,6 +49,7 @@ const isActive = computed(() => {
|
|||
|
||||
.active {
|
||||
color: var(--el-color-primary);
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@ export default {
|
|||
topbar: {
|
||||
github:"Github",
|
||||
handbook:"Handbook",
|
||||
forum:"Forum"
|
||||
forum:"Forum",
|
||||
MenuItem:{
|
||||
application:"application",
|
||||
dataset:"dataset",
|
||||
setting:"setting"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
|
||||
export default {
|
||||
topbar: {
|
||||
github:"项目地址",
|
||||
handbook:"用户手册",
|
||||
forum:"论坛求助"
|
||||
forum:"论坛求助",
|
||||
MenuItem:{
|
||||
application:"应用",
|
||||
dataset:"知识库",
|
||||
setting:"系统设置"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue