mirror of
https://github.com/doocs/md.git
synced 2024-11-28 13:36:32 +08:00
fix: resolve images issue
This commit is contained in:
parent
90fe9d45b0
commit
c8575cd016
@ -174,10 +174,10 @@ export default {
|
|||||||
copy(e) {
|
copy(e) {
|
||||||
this.$emit('startCopy');
|
this.$emit('startCopy');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
let clipboardDiv = document.getElementById('output');
|
||||||
solveWeChatImage();
|
solveWeChatImage();
|
||||||
fixCodeWhiteSpace();
|
fixCodeWhiteSpace();
|
||||||
this.setOutput(solveHtml());
|
this.setHtml(solveHtml());
|
||||||
let clipboardDiv = document.getElementById('output');
|
|
||||||
|
|
||||||
clipboardDiv.focus();
|
clipboardDiv.focus();
|
||||||
window.getSelection().removeAllRanges();
|
window.getSelection().removeAllRanges();
|
||||||
@ -189,6 +189,8 @@ export default {
|
|||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
window.getSelection().removeAllRanges()
|
window.getSelection().removeAllRanges()
|
||||||
fixCodeWhiteSpace('normal');
|
fixCodeWhiteSpace('normal');
|
||||||
|
|
||||||
|
clipboardDiv.innerHTML = this.output;
|
||||||
// 输出提示
|
// 输出提示
|
||||||
this.$notify({
|
this.$notify({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
@ -251,7 +253,7 @@ export default {
|
|||||||
document.body.removeChild(downLink)
|
document.body.removeChild(downLink)
|
||||||
},
|
},
|
||||||
...mapMutations(['clearEditorToDefault','setCurrentColor', 'setCiteStatus', 'themeChanged',
|
...mapMutations(['clearEditorToDefault','setCurrentColor', 'setCiteStatus', 'themeChanged',
|
||||||
'setOutput', 'setCurrentFont', 'setCurrentSize', 'setCssEditorValue', 'setWxRendererOptions'])
|
'setHtml', 'setCurrentFont', 'setCurrentSize', 'setCssEditorValue', 'setWxRendererOptions'])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.selectFont = this.currentFont;
|
this.selectFont = this.currentFont;
|
||||||
|
@ -16,6 +16,7 @@ Vue.use(Vuex)
|
|||||||
const state = {
|
const state = {
|
||||||
wxRenderer: null,
|
wxRenderer: null,
|
||||||
output: '',
|
output: '',
|
||||||
|
html: '',
|
||||||
editor: null,
|
editor: null,
|
||||||
cssEditor: null,
|
cssEditor: null,
|
||||||
currentFont: '',
|
currentFont: '',
|
||||||
@ -25,8 +26,8 @@ const state = {
|
|||||||
nightMode: false
|
nightMode: false
|
||||||
};
|
};
|
||||||
const mutations = {
|
const mutations = {
|
||||||
setOutput(state, data) {
|
setHtmL(state, data) {
|
||||||
state.output = data;
|
state.html = data;
|
||||||
},
|
},
|
||||||
setEditorValue(state, data) {
|
setEditorValue(state, data) {
|
||||||
state.editor.setValue(data)
|
state.editor.setValue(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user