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