From 2e3959bd12839d34da02142b5964d730ba12af4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=9B=B6=E6=AE=87=5FFanzero?=
<71616828+FanZeros@users.noreply.github.com>
Date: Wed, 18 May 2022 10:40:09 +0800
Subject: [PATCH] encode (#568)
---
src/components/Attachment/AttachmentDetailModal.vue | 8 ++------
src/components/Attachment/AttachmentSelectModal.vue | 10 +++++-----
src/components/Editor/MarkdownEditor.vue | 2 +-
src/components/Input/AttachmentInput.vue | 2 +-
src/components/Post/PostSettingModal.vue | 2 +-
src/views/attachment/AttachmentList.vue | 2 +-
src/views/sheet/components/SheetSettingModal.vue | 2 +-
src/views/sheet/independent/PhotoList.vue | 2 +-
.../sheet/independent/components/PhotoFormModal.vue | 4 ++--
9 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/src/components/Attachment/AttachmentDetailModal.vue b/src/components/Attachment/AttachmentDetailModal.vue
index 64865dba..98ebd402 100644
--- a/src/components/Attachment/AttachmentDetailModal.vue
+++ b/src/components/Attachment/AttachmentDetailModal.vue
@@ -63,7 +63,7 @@
普通链接:
- `
+ return `
`
})
}
},
@@ -378,8 +378,8 @@ export default {
if (!this.multiSelect) {
this.$emit('confirm', {
raw: [attachment],
- markdown: [`})`],
- html: [`
`]
+ markdown: [``],
+ html: [`
`]
})
this.modalVisible = false
return
diff --git a/src/components/Editor/MarkdownEditor.vue b/src/components/Editor/MarkdownEditor.vue
index 724035b1..8d07d874 100644
--- a/src/components/Editor/MarkdownEditor.vue
+++ b/src/components/Editor/MarkdownEditor.vue
@@ -69,7 +69,7 @@ export default {
const attachment = response.data
resolve({
name: attachment.name,
- path: encodeURI(attachment.path)
+ path: attachment.path
})
})
.catch(e => {
diff --git a/src/components/Input/AttachmentInput.vue b/src/components/Input/AttachmentInput.vue
index 21bc8027..882151cb 100644
--- a/src/components/Input/AttachmentInput.vue
+++ b/src/components/Input/AttachmentInput.vue
@@ -52,7 +52,7 @@ export default {
},
handleSelectAttachment({ raw }) {
if (raw.length) {
- this.$emit('input', encodeURI(raw[0].path))
+ this.$emit('input', raw[0].path)
}
},
focus() {
diff --git a/src/components/Post/PostSettingModal.vue b/src/components/Post/PostSettingModal.vue
index 2d631680..11eda59d 100644
--- a/src/components/Post/PostSettingModal.vue
+++ b/src/components/Post/PostSettingModal.vue
@@ -457,7 +457,7 @@ export default {
*/
handleSelectPostThumbnail({ raw }) {
if (raw.length) {
- this.form.model.thumbnail = encodeURI(raw[0].path)
+ this.form.model.thumbnail = raw[0].path
}
this.attachmentSelectVisible = false
},
diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue
index 040a44b5..75c197ce 100644
--- a/src/views/attachment/AttachmentList.vue
+++ b/src/views/attachment/AttachmentList.vue
@@ -85,7 +85,7 @@
diff --git a/src/views/sheet/components/SheetSettingModal.vue b/src/views/sheet/components/SheetSettingModal.vue
index 95dc82e2..66ab080a 100644
--- a/src/views/sheet/components/SheetSettingModal.vue
+++ b/src/views/sheet/components/SheetSettingModal.vue
@@ -405,7 +405,7 @@ export default {
*/
handleSelectSheetThumbnail({ raw }) {
if (raw.length) {
- this.form.model.thumbnail = encodeURI(raw[0].path)
+ this.form.model.thumbnail = raw[0].path
}
this.attachmentSelectVisible = false
},
diff --git a/src/views/sheet/independent/PhotoList.vue b/src/views/sheet/independent/PhotoList.vue
index 0dedb11e..bbad77bd 100644
--- a/src/views/sheet/independent/PhotoList.vue
+++ b/src/views/sheet/independent/PhotoList.vue
@@ -77,7 +77,7 @@
>