fix(web): 修复 lint 错误

- 调整 permissions/page.tsx 的 import 顺序
- 重命名未使用的 collectAllMenuIds 为 _collectAllMenuIds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
charilezhou
2026-01-19 12:34:32 +08:00
parent d747f98d08
commit b305e49e9b
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
'use client';
import { PermissionsTable } from '@/components/permissions';
import {
Card,
CardContent,
@@ -7,7 +8,6 @@ import {
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { PermissionsTable } from '@/components/permissions';
export default function PermissionsPage() {
return (

View File

@@ -151,12 +151,12 @@ export function RoleEditDialog({ role, open, onOpenChange }: RoleEditDialogProps
);
// 递归收集所有菜单 ID用于扁平化菜单树
const collectAllMenuIds = (menus: MenuTreeNode[]): string[] => {
const _collectAllMenuIds = (menus: MenuTreeNode[]): string[] => {
const ids: string[] = [];
for (const menu of menus) {
ids.push(menu.id);
if (menu.children && menu.children.length > 0) {
ids.push(...collectAllMenuIds(menu.children));
ids.push(..._collectAllMenuIds(menu.children));
}
}
return ids;