From 34c4b936a562b3c67f9de52391964a0ecb87428a Mon Sep 17 00:00:00 2001 From: yanglbme Date: Sat, 4 Jul 2020 17:54:48 +0800 Subject: [PATCH] fix: update copy method --- src/components/codeMirror/header.vue | 5 ++--- src/store/index.js | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/codeMirror/header.vue b/src/components/codeMirror/header.vue index 2652ea7..eaab384 100644 --- a/src/components/codeMirror/header.vue +++ b/src/components/codeMirror/header.vue @@ -177,8 +177,7 @@ export default { let clipboardDiv = document.getElementById('output'); solveWeChatImage(); fixCodeWhiteSpace(); - this.setHtml(solveHtml()); - + solveHtml(); clipboardDiv.focus(); window.getSelection().removeAllRanges(); let range = document.createRange(); @@ -253,7 +252,7 @@ export default { document.body.removeChild(downLink) }, ...mapMutations(['clearEditorToDefault','setCurrentColor', 'setCiteStatus', 'themeChanged', - 'setHtml', 'setCurrentFont', 'setCurrentSize', 'setCssEditorValue', 'setWxRendererOptions']) + 'setCurrentFont', 'setCurrentSize', 'setCssEditorValue', 'setWxRendererOptions']) }, mounted() { this.selectFont = this.currentFont; diff --git a/src/store/index.js b/src/store/index.js index 0e9876e..db8b943 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -26,9 +26,6 @@ const state = { nightMode: false }; const mutations = { - setHtmL(state, data) { - state.html = data; - }, setEditorValue(state, data) { state.editor.setValue(data) },