Commit df530d34 authored by guxukai's avatar guxukai

chore: 加入国际化

parent e7e9e5d9
...@@ -107,8 +107,8 @@ ...@@ -107,8 +107,8 @@
class="flex flex-col pb-0 bg-gray-50 dark:bg-[#151930] dark:text-white transition transition-all duration-300" class="flex flex-col pb-0 bg-gray-50 dark:bg-[#151930] dark:text-white transition transition-all duration-300"
> >
<el-breadcrumb :separator-icon="ArrowRight" class="pl-1"> <el-breadcrumb :separator-icon="ArrowRight" class="pl-1">
<el-breadcrumb-item v-for="(item, index) in breadcrumbList" :key="index" :to="{ path: item.path }"> <el-breadcrumb-item v-for="(item, index) in breadcrumbList" :key="index" :to="{ name: item.name }">
<span class="text-gray-700 dark:text-white">{{ item.title }}</span> <span class="text-gray-700 dark:text-white">{{ $t(`baas.menu.${item.name}`) }}</span>
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div class="flex-grow mt-4 h-full overflow-y-auto rounded-t-md border"> <div class="flex-grow mt-4 h-full overflow-y-auto rounded-t-md border">
...@@ -189,6 +189,7 @@ onBeforeRouteUpdate((to, from) => { ...@@ -189,6 +189,7 @@ onBeforeRouteUpdate((to, from) => {
title: to.meta.title!, title: to.meta.title!,
path: to.path, path: to.path,
level: to.meta.level, level: to.meta.level,
name: to.name as string,
}) })
} }
layoutStore.$patch({ layoutStore.$patch({
......
...@@ -9,6 +9,7 @@ export const useLayout = defineStore('layout', { ...@@ -9,6 +9,7 @@ export const useLayout = defineStore('layout', {
title: 'Home', title: 'Home',
level: 1, level: 1,
path: '/', path: '/',
name: 'home',
}, },
], ],
currentLocale: 'zh', currentLocale: 'zh',
......
...@@ -7,4 +7,5 @@ export type BreadcrumbType = { ...@@ -7,4 +7,5 @@ export type BreadcrumbType = {
title: string title: string
level: number level: number
path: string path: string
name: string
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment