mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(hooks): 修复登录页切换登录页参数丢失问题
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import type { RouteLocationNormalizedLoaded } from 'vue-router';
|
||||
import { store } from '@/store';
|
||||
|
||||
/** app状态 */
|
||||
interface AppState {
|
||||
menu: MenuState;
|
||||
multiTab: MultiTab;
|
||||
settingDrawer: SettingDrawer;
|
||||
}
|
||||
|
||||
@ -13,7 +15,11 @@ interface MenuState {
|
||||
collapsed: boolean;
|
||||
}
|
||||
|
||||
/** 设置抽屉的状态 */
|
||||
interface MultiTab {
|
||||
routes: RouteLocationNormalizedLoaded[];
|
||||
}
|
||||
|
||||
/** 项目配置抽屉的状态 */
|
||||
interface SettingDrawer {
|
||||
/** 设置抽屉可见性 */
|
||||
visible: boolean;
|
||||
@ -25,6 +31,9 @@ const appStore = defineStore({
|
||||
menu: {
|
||||
collapsed: false
|
||||
},
|
||||
multiTab: {
|
||||
routes: []
|
||||
},
|
||||
settingDrawer: {
|
||||
visible: false
|
||||
}
|
||||
@ -38,6 +47,8 @@ const appStore = defineStore({
|
||||
toggleMenu() {
|
||||
this.menu.collapsed = !this.menu.collapsed;
|
||||
},
|
||||
/** 初始化多tab的数据 */
|
||||
initMultiTab() {},
|
||||
/** 打开配置抽屉 */
|
||||
openSettingDrawer() {
|
||||
this.settingDrawer.visible = true;
|
||||
|
Reference in New Issue
Block a user