From c82805a80c5773e94f1e21174199e7d9d4d5c5d8 Mon Sep 17 00:00:00 2001 From: jmal Date: Tue, 20 Apr 2021 23:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B:=20fix=20the=20renaming=20problem?= =?UTF-8?q?=20=20=20=20fix=20the=20response=20problem=20of=20the=20interfa?= =?UTF-8?q?ce=20after=20deletion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 7a25ba4..e9ee1bf 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2274,6 +2274,9 @@ export default { }, // 重命名 rowRename(newFileName, row) { + //去掉回车换行 + newFileName = newFileName.replace(/[\r\n]/g,""); + console.log('newFileName', newFileName) if (newFileName) { if (/[\/\\"<>\?\*]/gi.test(newFileName)) { this.$message({ @@ -2931,7 +2934,7 @@ export default { setTimeout(() => { // 再执行移除 for (let i = 0; i < removeFileIndexList.length; i++) { - this.splice(removeFileIndexList[i], 1) + this.fileList.splice(removeFileIndexList[i], 1) } // 改变拖拽目标 this.rowDrop()