Skip to content

Commit 8b20f51

Browse files
committed
feat: 代码优化
1 parent 534d721 commit 8b20f51

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

frontend/src/layout/ViewLeft/ViewFolder.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ const uploadFileChange = async (e: any) => {
149149
return
150150
}
151151
152-
const children = uploadInfo.value.childNodes.map((i) => i.data.label)
153-
if (children.includes(file.name)) {
152+
if (uploadInfo.value.childNodes.some((i) => i.data.label === file.name)) {
154153
try {
155154
await ElMessageBox.confirm(`当前目录存在同名文件:【${file.name}】,继续上传将覆盖该文件,是否继续?`, '提示', {
156155
confirmButtonText: '继续',

0 commit comments

Comments
 (0)