feat: 优化

This commit is contained in:
2026-03-02 01:28:46 +08:00
parent b2e5bb85f4
commit ce3d529f80
11 changed files with 88 additions and 33 deletions

View File

@@ -406,10 +406,16 @@ const handleSaveGroupName = async (group) => {
const handleDeleteGroup = async (group, event) => {
event?.stopPropagation?.()
// 校验:分组内还有文件时不允许删除
if (group.fileCount > 0) {
message.warning(`分组「${group.name}」内还有 ${group.fileCount} 个文件,请先删除文件后再删除分组`)
return
}
const confirmed = await new Promise((resolve) => {
Modal.confirm({
title: '删除分组',
content: `确定要删除分组「${group.name}」吗?删除后该分组下的所有文件将被移动到默认分组。此操作不可恢复。`,
content: `确定要删除分组「${group.name}」吗?此操作不可恢复。`,
okText: '确认删除',
cancelText: '取消',
okType: 'danger',