From 21167ece56edd628e6f6546d1d642947cc3a048f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 12 八月 2024 22:17:33 +0800
Subject: [PATCH] 2024-08-12

---
 src/menu/components/editor/braft-editor/index.jsx |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/index.jsx b/src/menu/components/editor/braft-editor/index.jsx
index 6557e9c..ba933e2 100644
--- a/src/menu/components/editor/braft-editor/index.jsx
+++ b/src/menu/components/editor/braft-editor/index.jsx
@@ -55,8 +55,15 @@
 
       this.updateComponent(_card)
     } else {
+      let _card = fromJS(card).toJS()
+
+      if (_card.wrap.firstTr === 'light') {
+        _card.wrap.tbStyle = 'th-light'
+        delete _card.wrap.firstTr
+      }
+
       this.setState({
-        card: fromJS(card).toJS()
+        card: _card
       })
     }
   }
@@ -139,6 +146,10 @@
   updateWrap = (res) => {
     const { card } = this.state
 
+    if (res.tbStyle) {
+      res.tbStyle = res.tbStyle.join(' ')
+    }
+
     let _card = {...card, wrap: res}
 
     if (res.datatype === 'public') {
@@ -173,11 +184,11 @@
     let style = {...card.style}
 
     return (
-      <div className={'menu-normal-editor-box ' + (card.wrap.firstTr || '')} style={style} onClick={this.clickComponent} id={card.uuid}>
+      <div className={'menu-normal-editor-box ' + (card.wrap.tbStyle || '')} style={style} onClick={this.clickComponent} id={card.uuid}>
         <NormalHeader 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">
-            <NormalForm title="瀵屾枃鏈缃�" width={750} update={this.updateWrap} getForms={this.getWrapForms}>
+            <NormalForm title="瀵屾枃鏈缃�" width={850} update={this.updateWrap} getForms={this.getWrapForms}>
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="editor" card={card}/>

--
Gitblit v1.8.0