This commit is contained in:
dap
2024-09-12 07:47:12 +08:00
22 changed files with 697 additions and 244 deletions

View File

@@ -31,9 +31,9 @@ const showTheme = computed(() => props.toolbarList.includes('theme'));
<template>
<div
:class="{
'bg-accent z-10 rounded-3xl px-3 py-1': toolbarList.length > 1,
'bg-accent rounded-3xl px-3 py-1': toolbarList.length > 1,
}"
class="flex-center absolute right-2 top-4"
class="flex-center absolute right-2 top-4 z-10"
>
<!-- Only show on medium and larger screens -->
<div class="hidden md:flex">

View File

@@ -11,7 +11,7 @@ import {
usePreferences,
} from '@vben/preferences';
import { useLockStore, useUserStore } from '@vben/stores';
import { mapTree } from '@vben/utils';
import { deepToRaw, mapTree } from '@vben/utils';
import { VbenAdminLayout } from '@vben-core/layout-ui';
import { Toaster, VbenBackTop, VbenLogo } from '@vben-core/shadcn-ui';
@@ -113,7 +113,7 @@ const {
function wrapperMenus(menus: MenuRecordRaw[]) {
return mapTree(menus, (item) => {
return { ...item, name: $t(item.name) };
return { ...deepToRaw(item), name: $t(item.name) };
});
}

View File

@@ -5,7 +5,7 @@ import type { MenuProps } from '@vben-core/menu-ui';
import { Menu } from '@vben-core/menu-ui';
interface Props extends MenuProps {
menus?: MenuRecordRaw[];
menus: MenuRecordRaw[];
}
const props = withDefaults(defineProps<Props>(), {