From e70553694d5ab6869a85a0db60bc14942a06bc15 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 七月 2020 11:13:16 +0800 Subject: [PATCH] 2020-07-17 --- src/mob/components/login/mob-login-2/index.jsx | 42 +++++++++++++++++++++++++++++++----------- 1 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/mob/components/login/mob-login-2/index.jsx b/src/mob/components/login/mob-login-2/index.jsx index 6a9e31f..1848e65 100644 --- a/src/mob/components/login/mob-login-2/index.jsx +++ b/src/mob/components/login/mob-login-2/index.jsx @@ -30,9 +30,10 @@ user: { uuid: Utils.getuuid(), eleType: 'input', content: '閭/鎵嬫満', style: {}}, password: { uuid: Utils.getuuid(), eleType: 'input', content: '瀵嗙爜', style: {}}, login: { uuid: Utils.getuuid(), eleType: 'button', content: '鐧诲綍', style: {fontSize: '16px', color: '#ffffff', textAlign: 'center', lineHeight: 2.4, backgroundColor: '#44a8f2'}}, - phone: { uuid: Utils.getuuid(), eleType: 'button', content: '鎵嬫満鐭俊鐧诲綍/娉ㄥ唽', style: {fontSize: '16px', color: '#44a8f2', textAlign: 'center', lineHeight: 2.4, border: '1px solid #44a8f2'}}, + phone: { uuid: Utils.getuuid(), eleType: 'button', content: '鎵嬫満鐭俊鐧诲綍', style: {fontSize: '16px', color: '#44a8f2', textAlign: 'center', lineHeight: 2.4, border: '1px solid #44a8f2'}}, + register: { uuid: Utils.getuuid(), eleType: 'text', content: '娉ㄥ唽', style: {fontSize: '12px', color: '#44a8f2', textAlign: 'left'}}, lose: { uuid: Utils.getuuid(), eleType: 'text', content: '蹇樿瀵嗙爜锛�', style: {fontSize: '12px', color: '#44a8f2', textAlign: 'right', textDecoration: 'underline'}}, - register: { uuid: Utils.getuuid(), eleType: 'text', subItems: [ + auth: { uuid: Utils.getuuid(), eleType: 'text', subItems: [ {type: 'qq', icon: 'qq', label: 'QQ'}, {type: 'wechat', icon: 'wechat', label: '寰俊'}, ], content: '鍏朵粬鐧诲綍鏂瑰紡', style: {fontSize: '14px', color: '#bcbcbc', textAlign: 'center', marginTop: '30px', marginBottom: '20px'}}, @@ -136,6 +137,18 @@ ...fromJS(card.register.style).toJS(), componentId: card.uuid, uuid: card.register.uuid, + items: ['font'], + } + this.props.triggerEdit(element) + } + + editAuth = (e) => { + const { card } = this.props + e.stopPropagation() + let element = { + ...fromJS(card.auth.style).toJS(), + componentId: card.uuid, + uuid: card.auth.uuid, items: ['font', 'margin'], } this.props.triggerEdit(element) @@ -239,16 +252,23 @@ <ContentUpdate element={card.phone} updateContent={(ele) => this.updateContent({...card, phone: ele})}/> {card.phone.content} </Button> - {card.lose ? <div className={'plat-name ' + (editId === card.lose.uuid ? 'editing' : '')} style={card.lose.style} onClick={this.editLose}> - <ContentUpdate element={card.lose} updateContent={(ele) => this.updateContent({...card, lose: ele})}/> - {card.lose.content} + <div className="row-box"> + {card.register ? <div className={'col-item ' + (editId === card.register.uuid ? 'editing' : '')} style={card.register.style} onClick={this.editRegister}> + <ContentUpdate element={card.register} updateContent={(ele) => this.updateContent({...card, register: ele})}/> + {card.register.content} + </div> : null} + {card.lose ? <div className={'col-item right ' + (editId === card.lose.uuid ? 'editing' : '')} style={card.lose.style} onClick={this.editLose}> + <ContentUpdate element={card.lose} updateContent={(ele) => this.updateContent({...card, lose: ele})}/> + {card.lose.content} + </div> : null} + <div style={{clear: 'both'}}></div> + </div> + {card.auth ? <div className={'plat-name ' + (editId === card.auth.uuid ? 'editing' : '')} style={card.auth.style} onClick={this.editAuth}> + <ContentUpdate element={card.auth} updateContent={(ele) => this.updateContent({...card, auth: ele})}/> + {card.auth.content} </div> : null} - {card.register ? <div className={'plat-name ' + (editId === card.register.uuid ? 'editing' : '')} style={card.register.style} onClick={this.editRegister}> - <ContentUpdate element={card.register} updateContent={(ele) => this.updateContent({...card, register: ele})}/> - {card.register.content} - </div> : null} - {card.register ? <div className="other-register"> - {card.register.subItems.map(cell => ( + {card.auth ? <div className="other-auth"> + {card.auth.subItems.map(cell => ( <span key={cell.type}> <Icon type={cell.icon} /> <p>{cell.label}</p> -- Gitblit v1.8.0