diff --git a/src/renderer/manage/pages/bucketPage.vue b/src/renderer/manage/pages/bucketPage.vue
index a5db105..1dd55e5 100644
--- a/src/renderer/manage/pages/bucketPage.vue
+++ b/src/renderer/manage/pages/bucketPage.vue
@@ -1254,7 +1254,7 @@ https://www.baidu.com/img/bd_logo1.png"
@close="() => {
isSingleRename = false
isRenameIncludeExt = false
- }"
+ }"
>
-
+
matchedFiles.filter((item2: any) => item2.newName === item.newName).length > 1).length
let successCount = 0
let failCount = 0
const error = new Error('error')
@@ -2648,13 +2649,31 @@ async function BatchRename () {
})
})
}
- const promiseList = [] as any[]
- for (let i = 0; i < matchedFiles.length; i++) {
- promiseList.push(renamefunc(matchedFiles[i]))
+ if (duplicateFilesNum > 0) {
+ ElMessageBox.confirm(`检测到有${duplicateFilesNum}个文件名重复,是否继续?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ const promiseList = [] as any[]
+ for (let i = 0; i < matchedFiles.length; i++) {
+ promiseList.push(renamefunc(matchedFiles[i]))
+ }
+ Promise.allSettled(promiseList).then(() => {
+ ElMessage.success(`重命名成功${successCount}个,失败${failCount}个`)
+ })
+ }).catch(() => {
+ ElMessage.info('已取消')
+ })
+ } else {
+ const promiseList = [] as any[]
+ for (let i = 0; i < matchedFiles.length; i++) {
+ promiseList.push(renamefunc(matchedFiles[i]))
+ }
+ Promise.allSettled(promiseList).then(() => {
+ ElMessage.success(`重命名成功${successCount}个,失败${failCount}个`)
+ })
}
- Promise.allSettled(promiseList).then(() => {
- ElMessage.success(`重命名成功${successCount}个,失败${failCount}个`)
- })
}
function handelBatchCopyInfo () {