()
| 121 | } |
| 122 | |
| 123 | const handleBatchDelete = (): void => { |
| 124 | if (checkedKeys.length === 0) return |
| 125 | showDeleteConfirm({ |
| 126 | title: `删除 ${checkedKeys.length} 个项目`, |
| 127 | onOk: async () => { |
| 128 | const pageIds = checkedKeys.filter((key) => pages.some((p) => p.id === key)) |
| 129 | const folderIds = checkedKeys.filter((key) => folders.some((f) => f.id === key)) |
| 130 | await deletePages(pageIds) |
| 131 | await deleteFolders(folderIds) |
| 132 | setCheckedKeys([]) |
| 133 | setMultiSelect(false) |
| 134 | } |
| 135 | }) |
| 136 | } |
| 137 | |
| 138 | const getAllKeys = (): string[] => { |
| 139 | return [...pages.map((p) => p.id), ...folders.map((f) => f.id)] |
nothing calls this directly
no test coverage detected