Skip to content

Commit

Permalink
✨ Feature: add {atuo} for rename placholders, represent for auto incr…
Browse files Browse the repository at this point in the history
…ement number

ISSUES CLOSED: #14
  • Loading branch information
Kuingsmile committed Mar 1, 2023
1 parent 327a7ac commit d6df9bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/renderer/manage/pages/bucketPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,13 @@ https://www.baidu.com/img/bd_logo1.png"
>
{{ item.descriptionB }}
</el-descriptions-item>
<el-descriptions-item
label="{auto}"
align="center"
label-style="width: 100px;"
>
自增数字
</el-descriptions-item>
</el-descriptions>
</el-popover>
</span>
Expand Down Expand Up @@ -2578,6 +2585,9 @@ async function BatchRename () {
ElMessage.warning('没有需要重命名的文件')
return
}
for (let i = 0; i < matchedFiles.length; i++) {
matchedFiles[i].newName = matchedFiles[i].newName.replaceAll('{auto}', (i + 1).toString())
}
let successCount = 0
let failCount = 0
const error = new Error('error')
Expand Down Expand Up @@ -2942,6 +2952,7 @@ function singleRename () {
ElMessage.info('新文件名与原文件名相同,无需重命名')
return
}
itemToBeRenamed.value.newName = itemToBeRenamed.value.newName.replaceAll('{auto}', '1')
const item = currentPageFilesInfo[index]
const param = {
// tcyun
Expand Down

0 comments on commit d6df9bc

Please sign in to comment.