登录界面优化
This commit is contained in:
@@ -17,7 +17,7 @@ export const useMenuStore = defineStore('menu', () => {
|
||||
const buildAppsList = () => {
|
||||
return defaultApps.map(app => ({
|
||||
...app,
|
||||
selected: quickAppIds.value.includes(app.menuId)
|
||||
selected: quickAppIds.value.includes(app.path)
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export const useMenuStore = defineStore('menu', () => {
|
||||
// 只持久化快捷应用的 menuId 列表
|
||||
quickAppIds.value = appsList.value
|
||||
.filter(app => app.selected)
|
||||
.map(app => app.menuId)
|
||||
.map(app => app.path)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,8 +22,8 @@ export const useUserStore = defineStore('user', () => {
|
||||
const currentProject = ref(null)
|
||||
|
||||
// 监听 currentProject 变化,获取菜单权限
|
||||
watch(() => currentProject.value?.ProjectId, (newId) => {
|
||||
if (newId) {
|
||||
watch(() => currentProject.value?.ProjectId, (newId,oldId) => {
|
||||
if (newId!==oldId) {
|
||||
// 项目变化 请求菜单权限
|
||||
const menuStore = useMenuStore()
|
||||
const userId = userInfo.value?.PersonId
|
||||
|
||||
Reference in New Issue
Block a user