From 8e5e35eac41ba16f4b875bbcf07bab3878d8e2e4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 06 七月 2024 14:34:35 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/components/editor/index.jsx |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/components/editor/index.jsx b/src/components/editor/index.jsx
index ede20dc..05a82fa 100644
--- a/src/components/editor/index.jsx
+++ b/src/components/editor/index.jsx
@@ -21,7 +21,7 @@
 
   state = {
     editorState: '',
-    encryption: 'false',
+    encryption: 'false'
   }
 
   UNSAFE_componentWillMount () {
@@ -51,6 +51,7 @@
       encryption
     })
   }
+
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.props), fromJS(nextProps))
   }
@@ -213,10 +214,16 @@
   }
 
   render() {
+    const { config } = this.props
     const { editorState } = this.state
 
+    let style = null
+    if (config && config.contHeidht) {
+      style = {'--editor-height': config.contHeidht < 100 ? config.contHeidht + 'vh' : config.contHeidht + 'px'}
+    }
+
     return (
-      <div className="normal-braft-editor">
+      <div className="normal-braft-editor" style={style}>
         <BraftEditor
           value={editorState}
           onChange={this.handleEditorChange}

--
Gitblit v1.8.0