From c519b4e51fe07bf13a2a7e44abd648b8dc0c083d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 23 六月 2020 12:12:12 +0800
Subject: [PATCH] 2020-06-23

---
 src/mob/login/index.jsx |   39 ++++++++++++++++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/src/mob/login/index.jsx b/src/mob/login/index.jsx
index fb6441a..013dbf9 100644
--- a/src/mob/login/index.jsx
+++ b/src/mob/login/index.jsx
@@ -14,6 +14,7 @@
 class MobLogin extends Component {
   static propTpyes = {
     card: PropTypes.object,
+    editId: PropTypes.any,
     triggerEdit: PropTypes.func,
     onDoubleClick: PropTypes.func
   }
@@ -51,32 +52,60 @@
   }
 
   editLogo = (e) => {
+    const { card } = this.props
     e.stopPropagation()
+    let element = {
+      uuid: card.logo.uuid,
+      items: ['picture'],
+      item: fromJS(card.logo).toJS()
+    }
+    this.props.triggerEdit(element)
   }
 
   editTitle = (e) => {
+    const { card } = this.props
     e.stopPropagation()
+    let element = {
+      uuid: card.title.uuid,
+      items: ['font'],
+      item: fromJS(card.title).toJS()
+    }
+    this.props.triggerEdit(element)
   }
 
   editMsg = (e) => {
+    const { card } = this.props
     e.stopPropagation()
+    let element = {
+      uuid: card.copyright.uuid,
+      items: ['font'],
+      item: fromJS(card.copyright).toJS()
+    }
+    this.props.triggerEdit(element)
   }
 
   editBox = (e) => {
+    const { card } = this.props
     e.stopPropagation()
+    let element = {
+      uuid: card.box.uuid,
+      items: ['font', 'padding', 'background'],
+      item: fromJS(card.box).toJS()
+    }
+    this.props.triggerEdit(element)
   }
 
   render () {
-    const { card } = this.props
+    const { card, editId } = this.props
     const { getFieldProps } = this.props.form
     const { rember } = this.state
-
+    console.log(editId)
     return (
       <div className="mob-login" onClick={this.editBox} style={{paddingTop: `calc(17vh - 10px)`}}>
-        <div className="logo" onClick={this.editLogo}>
+        <div className={'logo ' + (editId === card.logo.uuid ? 'editing' : '')} onClick={this.editLogo}>
           <img src={card.logo.content} alt=""/>
         </div>
-        <div className="plat-name" onClick={this.editTitle}>鏄庣鍟嗕笟鏅鸿兘寮�鏀惧钩鍙�</div>
+        <div className={'plat-name ' + (editId === card.title.uuid ? 'editing' : '')} onClick={this.editTitle}>鏄庣鍟嗕笟鏅鸿兘寮�鏀惧钩鍙�</div>
         <InputItem
           placeholder="UserName"
           prefixListCls="mk-login-item am-list"
@@ -109,7 +138,7 @@
           <div className="clear-both"></div>
         </div>
         <Button type="primary" onDoubleClick={() => this.props.doubleClickCard(card.login)}>鐧诲綍</Button>
-        <div className="company-msg" onClick={this.editMsg}>
+        <div className={'company-msg ' + (editId === card.copyright.uuid ? 'editing' : '')} onClick={this.editMsg}>
           <p>Copyright漏2017  鎵�鏈夌浉鍏崇増鏉冨綊  鍖椾含鏄庣鏅崕淇℃伅鎶�鏈湁闄愬叕鍙�</p>
         </div>
       </div>

--
Gitblit v1.8.0