diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index f6765ffd..6a214aa7 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -341,7 +341,6 @@ getLandingdata(val){ let path = null; let canvasEle=this.canvasImg;  //获取元素 let scrolDom=this.canvascrol; - console.log(351,this); scrolDom.scrollTop = 0; let dom=document.querySelector('.xj-viewer-mask'); let dom2=document.querySelector('.editor-main'); @@ -357,7 +356,6 @@ getLandingdata(val){ }).then(async (canvas) => { //处理你生成的canvas document.body.appendChild(canvas); - let a = document.createElement('a'); let file = canvas.toDataURL( ); let thumbimg= self.dataURLtoFile(file,'image/png'); let imgformdata= new FormData(); @@ -479,7 +477,11 @@ getLandingdata(val){ }; - + componentWillUnmount(){ + if(document.querySelector('canvas')){ + document.querySelector('canvas').remove(); + } + } render(){ diff --git a/src/pages/exchangepage/edittemplate/wangeditorCom.js b/src/pages/exchangepage/edittemplate/wangeditorCom.js index c5586151..bc8d381f 100644 --- a/src/pages/exchangepage/edittemplate/wangeditorCom.js +++ b/src/pages/exchangepage/edittemplate/wangeditorCom.js @@ -14,9 +14,10 @@ export default class wangeditor extends React.Component{ const editor = new Editor('#wangeditorDom') this.setState({editor}); editor.config.colors = [ - '#880000', - '#800080', - '#ff0000' + '#696969', + '#9093a2', + '#fgddbb', + '#e3e7eb' ]; editor.config.pasteText = true; // 设置编辑区域高度为 500px