src/components/edit/index.vue
@@ -11,6 +11,7 @@ editor: null } }, props:['getMyBody'], mounted() { this.editor = new E('#edit'); this.editor.config.height = 450; @@ -18,6 +19,11 @@ '#4b9bb7', '#09152f' ] this.editor.config.onchange =(html)=>{ // 第二步,监控变化,同步更新到 textarea this.$emit('getMyBody',html); } this.editor.create(); }, beforeDestroy() { @@ -33,6 +39,7 @@ background-color: #09152f !important; color: #4b9bb7; } :deep(.w-e-text-container){ background-color: #09152f !important; color: #4b9bb7;