mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: 修复training nav支持定义插入位置
This commit is contained in:
1 parent
47ceddea9e
commit
46630065aa
6 files changed
+17
-8
No files matched your search
@@ -37,9 +37,15 @@ export const Nav = (
|
||||
name: string, args: Dictionary<any> = {}, prefix: string,
|
||||
...permPrivChecker: Array<number | bigint | Function>
|
||||
) => {
|
||||
global.Hydro.ui.nodes.nav.push({
|
||||
name, args: args || {}, prefix, checker: buildChecker(...permPrivChecker),
|
||||
});
|
||||
if (name.startsWith('@@')) {
|
||||
global.Hydro.ui.nodes.nav.splice(+name.split('@@')[1], 0, {
|
||||
name: name.split('@@')[2], args: args || {}, prefix, checker: buildChecker(...permPrivChecker),
|
||||
});
|
||||
} else {
|
||||
global.Hydro.ui.nodes.nav.push({
|
||||
name, args: args || {}, prefix, checker: buildChecker(...permPrivChecker),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const ProblemAdd = (
|
||||
|
||||
Reference in new issue
Block a user