From 8753aeefb8e3a4463be9d76328c42c1b4caad90a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 九月 2021 19:14:07 +0800
Subject: [PATCH] 2021-09-09

---
 src/menu/components/editor/braft-editor/index.jsx |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/index.jsx b/src/menu/components/editor/braft-editor/index.jsx
index 994da8b..63b9cb3 100644
--- a/src/menu/components/editor/braft-editor/index.jsx
+++ b/src/menu/components/editor/braft-editor/index.jsx
@@ -51,7 +51,7 @@
         name: card.name,
         subtype: card.subtype,
         setting: { interType: 'system' },
-        wrap: { name: card.name, width: card.width || 24, encryption: 'true' },
+        wrap: { name: card.name, width: card.width || 24, encryption: 'true', minHeight: 100 },
         style: { marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' },
         headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' },
         columns: [],
@@ -137,16 +137,6 @@
     this.props.updateConfig(_card)
   }
 
-  /**
-   * @description 鏇存柊鎼滅储鏉′欢閰嶇疆淇℃伅
-   */
-  updateconfig = (config) => {
-    this.setState({
-      card: config
-    })
-    this.props.updateConfig(config)
-  }
-
   getWrapForms = () => {
     const { card } = this.state
 
@@ -154,7 +144,7 @@
   }
 
   updateWrap = (res) => {
-    this.updateconfig({...this.state.card, wrap: res})
+    this.updateComponent({...this.state.card, wrap: res})
   }
 
   clickComponent = (e) => {
@@ -166,8 +156,14 @@
 
   render() {
     const { card } = this.state
+
+    let style = {...card.style}
+    if (card.wrap.minHeight) {
+      style.minHeight = card.wrap.minHeight
+    }
+
     return (
-      <div className="menu-normal-editor-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}>
+      <div className="menu-normal-editor-box" style={style} onClick={this.clickComponent} id={card.uuid}>
         <NormalHeader defaultshow="hidden" hideSearch="true" config={card} updateComponent={this.updateComponent}/>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">

--
Gitblit v1.8.0