From c9b8f6c138e67cb3dba4c95b4fd2ed9fd7beb9c9 Mon Sep 17 00:00:00 2001 From: jmal Date: Mon, 15 Aug 2022 17:07:39 +0800 Subject: [PATCH] perf: encodeURI --- src/components/ShowFile/ShowFile.vue | 2 +- src/components/preview/SimTextPreview.vue | 2 +- src/views/home/mobile/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index c637bc8..5b4fc9a 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2415,7 +2415,7 @@ export default { return } api.rename({ - newFileName: newFileName, + newFileName: encodeURI(newFileName), username: this.$store.state.user.name, id: row.id }).then(res => { diff --git a/src/components/preview/SimTextPreview.vue b/src/components/preview/SimTextPreview.vue index 08f6aeb..09c184e 100644 --- a/src/components/preview/SimTextPreview.vue +++ b/src/components/preview/SimTextPreview.vue @@ -684,7 +684,7 @@ update(value,path,index) { this.updating = true markdownApi.editMarkdownByPath({ - relativePath: path, + relativePath: encodeURI(path), userId: this.$store.state.user.userId, username: this.$store.state.user.name, contentText: value diff --git a/src/views/home/mobile/index.vue b/src/views/home/mobile/index.vue index 7c1cf1f..65f081e 100644 --- a/src/views/home/mobile/index.vue +++ b/src/views/home/mobile/index.vue @@ -584,7 +584,7 @@ export default { } api.rename({ - newFileName: newFileName, + newFileName: encodeURI(newFileName), username: this.$store.state.user.name, id: row.id }).then(res => {