Skip to content

Commit

Permalink
feat: 新增《技术文档》菜单模块
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwumm committed Jan 20, 2025
1 parent d9a8f7f commit 46ab79c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"user-manage":"User Manage",
"personal-center":"Personal Center",
"/_not-found":"404",
"menu-manage":"Menu Manage"
"menu-manage":"Menu Manage",
"technical-document":"Technical Document",
"nextjs":"Next.js Document",
"heroui":"Heroui Document",
"prisma":"Prisma Document"
},
"Pages":{
"internationalization":{
Expand Down
6 changes: 5 additions & 1 deletion messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"user-manage":"用户管理",
"personal-center":"个人中心",
"/_not-found":"404",
"menu-manage":"菜单管理"
"menu-manage":"菜单管理",
"technical-document":"技术文档",
"nextjs":"Next.js 文档",
"heroui":"Heroui 文档",
"prisma":"Prisma 文档"
},
"Pages":{
"internationalization":{
Expand Down
10 changes: 7 additions & 3 deletions src/components/NavMain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 白雾茫茫丶<baiwumm.com>
* @Date: 2024-12-06 14:47:26
* @LastEditors: 白雾茫茫丶<baiwumm.com>
* @LastEditTime: 2025-01-16 17:27:19
* @LastEditTime: 2025-01-20 10:37:52
* @Description: 菜单布局
*/
'use client';
Expand Down Expand Up @@ -50,8 +50,12 @@ export default function NavMain() {
if (hasChdilren) {
return;
}
router.push(path);
setActiveKey(path);
if (path.startsWith('https://') || path.startsWith('http://')) {
window.open(path);
} else {
router.push(path);
setActiveKey(path);
}
};

useEffect(() => {
Expand Down

0 comments on commit 46ab79c

Please sign in to comment.