From 67678c904569b6ffdf47aa55105c4c346fba688e Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 24 Aug 2022 18:32:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=8C=E6=96=87=E6=9C=AC=E8=A7=86=E5=9B=BE=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E5=BB=B6=E8=BF=9F=E5=AF=BC=E8=87=B4=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/DeRichTextView.vue | 32 ++++++++++--------- frontend/src/views/panel/edit/index.vue | 1 - 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/DeRichTextView.vue b/frontend/src/components/canvas/custom-component/DeRichTextView.vue index ebee3834ad..17ad238e19 100644 --- a/frontend/src/components/canvas/custom-component/DeRichTextView.vue +++ b/frontend/src/components/canvas/custom-component/DeRichTextView.vue @@ -131,9 +131,9 @@ export default { viewInit(){ bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect) tinymce.init({}) - this.myValue = this.assignment(this.element.propValue.textValue) - bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange) this.$nextTick(()=>{ + this.myValue = this.assignment(this.element.propValue.textValue) + bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange) this.initReady=true }) }, @@ -170,19 +170,21 @@ export default { }, resetSelect(node){ const edInner = tinymce.get(this.tinymceId); - const nodeArray = edInner.dom.select(".base-selected") - if(nodeArray){ - nodeArray.forEach(nodeInner=>{ - nodeInner.removeAttribute('class') - }) - } - if(node){ - const pNode = node.parentElement - if(pNode && pNode.id&& pNode.id.indexOf('changeText')>-1){ - const innerId = '#'+pNode.id - const domTest = edInner.dom.select(innerId)[0] - domTest.setAttribute("class",'base-selected') - edInner.selection.select(domTest) + if(edInner.dom){ + const nodeArray = edInner.dom.select(".base-selected") + if(nodeArray){ + nodeArray.forEach(nodeInner=>{ + nodeInner.removeAttribute('class') + }) + } + if(node){ + const pNode = node.parentElement + if(pNode && pNode.id&& pNode.id.indexOf('changeText')>-1){ + const innerId = '#'+pNode.id + const domTest = edInner.dom.select(innerId)[0] + domTest.setAttribute("class",'base-selected') + edInner.selection.select(domTest) + } } } }, diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 2535f605f7..60be253b72 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -1399,7 +1399,6 @@ export default { } .this_mobile_canvas_cell { - text-align: center; height: 100%; display: flex; align-items: center;