Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -6,7 +6,6 @@ import { preferences, usePreferences } from '@vben/preferences';
|
||||
|
||||
import AuthenticationFormView from './form.vue';
|
||||
import SloganIcon from './icons/slogan.vue';
|
||||
import Toolbar from './toolbar.vue';
|
||||
|
||||
defineOptions({ name: 'Authentication' });
|
||||
|
||||
@@ -56,11 +55,7 @@ const logoSource = computed(() => preferences.logo.source);
|
||||
<div v-if="authPanelCenter" class="flex-center bg-authentication w-full">
|
||||
<AuthenticationFormView
|
||||
class="md:bg-background w-full rounded-3xl pb-20 shadow-2xl md:w-2/3 lg:w-1/2 xl:w-2/5"
|
||||
>
|
||||
<template #toolbar>
|
||||
<Toolbar />
|
||||
</template>
|
||||
</AuthenticationFormView>
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 右侧认证面板 -->
|
||||
|
@@ -30,7 +30,7 @@ async function handleSelect(key: string) {
|
||||
<Menu
|
||||
:accordion="accordion"
|
||||
:collapse="collapse"
|
||||
:default-active="route.path"
|
||||
:default-active="route.meta?.activePath || route.path"
|
||||
:menus="menus"
|
||||
:rounded="rounded"
|
||||
:theme="theme"
|
||||
|
@@ -81,7 +81,7 @@ function useExtraMenu() {
|
||||
watch(
|
||||
() => route.path,
|
||||
(path) => {
|
||||
const currentPath = path;
|
||||
const currentPath = route.meta?.activePath || path;
|
||||
// if (preferences.sidebar.expandOnHover) {
|
||||
// return;
|
||||
// }
|
||||
|
@@ -113,7 +113,7 @@ function useMixedMenu() {
|
||||
|
||||
// 初始化计算侧边菜单
|
||||
onBeforeMount(() => {
|
||||
calcSideMenus();
|
||||
calcSideMenus(route.meta?.activePath || route.path);
|
||||
});
|
||||
|
||||
return {
|
||||
|
@@ -100,15 +100,11 @@ export function useTabbar() {
|
||||
watch(
|
||||
() => route.path,
|
||||
() => {
|
||||
// 这里不能用route,用route时,vue-router会自动将父级meta进行合并
|
||||
const routes = router.getRoutes();
|
||||
const currentRoute = routes.find((item) => item.path === route.path);
|
||||
if (currentRoute) {
|
||||
tabbarStore.addTab({
|
||||
...route,
|
||||
meta: currentRoute.meta,
|
||||
} as unknown as RouteLocationNormalizedGeneric);
|
||||
}
|
||||
const meta = route.matched?.[route.matched.length - 1]?.meta;
|
||||
tabbarStore.addTab({
|
||||
...route,
|
||||
meta: meta || route.meta,
|
||||
});
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import type { RegisterEmits } from './typings';
|
||||
|
||||
import { computed, reactive } from 'vue';
|
||||
|
||||
import {
|
||||
@@ -19,6 +17,14 @@ interface Props {
|
||||
text?: string;
|
||||
}
|
||||
|
||||
interface LockAndRegisterParams {
|
||||
lockScreenPassword: string;
|
||||
}
|
||||
|
||||
interface RegisterEmits {
|
||||
submit: [LockAndRegisterParams];
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
name: 'LockScreenModal',
|
||||
});
|
||||
|
@@ -1,9 +0,0 @@
|
||||
interface LockAndRegisterParams {
|
||||
lockScreenPassword: string;
|
||||
}
|
||||
|
||||
interface RegisterEmits {
|
||||
submit: [LockAndRegisterParams];
|
||||
}
|
||||
|
||||
export type { LockAndRegisterParams, RegisterEmits };
|
Reference in New Issue
Block a user