From e1cee96b38805bcccf48e7bcb9d296f2bc54c720 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 24 一月 2025 11:10:32 +0800
Subject: [PATCH] 2025-01-24

---
 src/mob/components/menubar/normal-menubar/menucomponent/index.jsx |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
index 3c28d9f..28acf2c 100644
--- a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
+++ b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
@@ -36,10 +36,6 @@
     })
   }
 
-  componentDidMount () {
-    MKEmitter.addListener('submitStyle', this.getStyle)
-  }
-
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.state), fromJS(nextState))
   }
@@ -51,14 +47,10 @@
     this.setState = () => {
       return
     }
-    MKEmitter.removeListener('submitStyle', this.getStyle)
   }
 
-  getStyle = (comIds, style) => {
-    const { cards } = this.props
+  getStyle = (style) => {
     const { card } = this.state
-
-    if (comIds.length !== 2 || comIds[0] !== cards.uuid || comIds[1] !== card.uuid) return
 
     let _card = fromJS(card).toJS()
     _card.style = style
@@ -71,13 +63,12 @@
   }
 
   changeStyle = () => {
-    const { cards } = this.props
     const { card } = this.state
 
     let _style = card.style ? fromJS(card.style).toJS() : {}
     let options = ['font', 'border', 'padding', 'margin', 'background']
 
-    MKEmitter.emit('changeStyle', [cards.uuid, card.uuid], options, _style)
+    MKEmitter.emit('changeStyle', options, _style, this.getStyle)
   }
 
   getSettingForms = () => {
@@ -127,7 +118,7 @@
       <Col span={card.setting.width || 6}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <NormalForm title="鑿滃崟缂栬緫" width={900} update={this.updateSetting} getForms={this.getSettingForms}>
+            <NormalForm title="鑿滃崟缂栬緫" width={950} update={this.updateSetting} getForms={this.getSettingForms}>
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="menucell" card={card}/>
@@ -155,7 +146,7 @@
               }} type={card.setting.icon || 'cloud'}/>
               {card.setting.tip ? <sup className="am-badge-text"></sup> : null}
             </div> : <div className="menu-sign">
-              <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/>
+              <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt=""/>
               {card.setting.tip ? <sup className="am-badge-text"></sup> : null}
             </div>}
             <div className="menu-name" style={{opacity: !card.setting.name ? 0 : 1}}>{card.setting.name || '鏄庣'}</div>

--
Gitblit v1.8.0