fix(context): share selected campus across layout

This commit is contained in:
yelan
2026-08-27 17:09:32 +08:00
parent a61946b520
commit b533ab2a58
2 changed files with 9 additions and 6 deletions
+4
View File
@@ -1,11 +1,15 @@
import { defineStore } from 'pinia'
import type { WorkbenchCampus } from '@/api/workbench/types'
export const useAppStore = defineStore('app', {
state: () => ({
isLoggedIn: false,
userName: '张文静',
department: '医务管理 · 主任医师',
environment: '原型演示环境',
campuses: ['本部院区', '东院区', '西院区'] as WorkbenchCampus[],
selectedCampus: '本部院区' as WorkbenchCampus,
}),
actions: {
login(userName: string) {