diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 8e90ca6..0000000 --- a/.dockerignore +++ /dev/null @@ -1,35 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -**/node_modules -/src/utils/request-temp.js - -# production -/.vscode - -# misc -.DS_Store -npm-debug.log* -yarn-error.log - -/coverage -.idea -yarn.lock -package-lock.json -*bak -.vscode - -# visual studio code -.history -*.log - -functions/mock -.temp/** - -# umi -.umi -.umi-production - -# screenshot -screenshot -.firebase \ No newline at end of file diff --git a/src/pages/System/Menu/index.tsx b/src/pages/System/Menu/index.tsx index bdc6ef1..c346f9c 100644 --- a/src/pages/System/Menu/index.tsx +++ b/src/pages/System/Menu/index.tsx @@ -26,15 +26,6 @@ type MenuItem = MenuData & { children?: MenuItem[]; // 用于处理树结构 }; -// 工具函数:将平铺数组转为树形结构 -function listToTree(list: T[], parentId: string = '0'): T[] { - return list - .filter(item => (item.parentId ?? '0') === parentId) - .map(item => ({ - ...item, - children: listToTree(list, item.menuId) - })); -} // 菜单管理组件 @@ -89,10 +80,9 @@ const MenuManagement: React.FC = () => { // 处理编辑 const handleEdit = (item: MenuItem) => { - debugger; setEditingItem(item); form.setFieldsValue({ - id: item.menuId, + menuId: item.menuId, parentId: item.parentId, // parentName: item.parentName, menuName: item.menuName, @@ -141,7 +131,7 @@ const MenuManagement: React.FC = () => { menuId: '-1', // 临时标识新增项 }); form.setFieldsValue({ - id: null, + menuId: null, menuName: '', menuOrder: 0, menuUrl: '', @@ -255,6 +245,7 @@ const MenuManagement: React.FC = () => { // 模态框确定按钮处理 const handleOk = async () => { try { + debugger const values = await form.validateFields(); if (!values.parentId) values.parentId = '0'; if (editingItem && editingItem.menuId !== '-1') { @@ -337,7 +328,7 @@ const MenuManagement: React.FC = () => { >