Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b79fe6cf
authored
Sep 01, 2025
by
F。
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复"边栏"权限控制问题
parent
354e866a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
web/src/hooks/common/useSidebar.js
+3
-2
No files found.
web/src/hooks/common/useSidebar.js
View file @
b79fe6cf
...
...
@@ -128,8 +128,9 @@ export const useSidebar = () => {
// 刷新用户配置的方法(供外部调用)
const
refreshUserConfig
=
async
()
=>
{
// 移除adminConfig的条件限制,直接刷新用户配置
await
loadUserConfig
();
if
(
Object
.
keys
(
adminConfig
).
length
>
0
)
{
await
loadUserConfig
();
}
// 触发全局刷新事件,通知所有useSidebar实例更新
sidebarEventTarget
.
dispatchEvent
(
new
CustomEvent
(
SIDEBAR_REFRESH_EVENT
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment