From 4d32dfa2b3e76048cfed88d4ade9d618c3f8d20b Mon Sep 17 00:00:00 2001 From: yanglbme Date: Sat, 2 May 2020 15:59:06 +0800 Subject: [PATCH] fix: resolve upload method --- src/components/CodemirrorEditor.vue | 2 +- src/components/codeMirror/header.vue | 1 - src/components/codeMirror/insertForm.vue | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/CodemirrorEditor.vue b/src/components/CodemirrorEditor.vue index 14f7f5a..242b701 100644 --- a/src/components/CodemirrorEditor.vue +++ b/src/components/CodemirrorEditor.vue @@ -131,7 +131,7 @@ export default { data.append('file', pasteFile) fileApi.fileUpload(data).then(res => { - this.uploaded(resp.data) + this.uploaded(res) }).catch(err => { console.log(err.message) }) diff --git a/src/components/codeMirror/header.vue b/src/components/codeMirror/header.vue index bd9d11d..590d764 100644 --- a/src/components/codeMirror/header.vue +++ b/src/components/codeMirror/header.vue @@ -92,7 +92,6 @@ export default { output: state=> state.output, editor: state=> state.editor, cssEditor: state=> state.cssEditor, - html: state=> state.html, currentFont: state=> state.currentFont, currentSize: state=> state.currentSize, currentColor: state=> state.currentColor diff --git a/src/components/codeMirror/insertForm.vue b/src/components/codeMirror/insertForm.vue index 8f9b784..8a58938 100644 --- a/src/components/codeMirror/insertForm.vue +++ b/src/components/codeMirror/insertForm.vue @@ -52,9 +52,9 @@ export default { let table = '' for (let i = 0; i < rows + 2; ++i) { - for (let j = 0; j < cols + 1; ++j) { - table += (j === 0 ? '|' : (i !== 1 ? ' |' : ' --- |')) - } + for (let j = 0; j < cols + 1; ++j) { + table += (j === 0 ? '|' : (i !== 1 ? ' |' : ' --- |')) + } table += '\n' }