Commit fc513784 authored by mercury233's avatar mercury233

fix

parent 836b8ad6
Pipeline #19641 passed with stages
in 1 minute and 13 seconds
...@@ -107,25 +107,25 @@ class Profiles extends React.Component { ...@@ -107,25 +107,25 @@ class Profiles extends React.Component {
<Form onSubmit={this.onUpdateSubmit}> <Form onSubmit={this.onUpdateSubmit}>
<FormItem style={{ display: 'flex', justifyContent: 'center' }}> <FormItem style={{ display: 'flex', justifyContent: 'center' }}>
<div style={{flexDirection: 'column'}}> <div style={{display: 'flex', flexDirection: 'column'}}>
<Cropper <Cropper
ref={(cropper) => { ref={(cropper) => {
this.cropper = cropper; this.cropper = cropper;
}} }}
src={imageUrl || defaultAvatar} src={imageUrl || defaultAvatar}
className="cropper-image" className="cropper-image"
style={{ height: '300px', width: '300px', display: isUpload ? 'flex' : 'none' }} style={{ height: '300px', width: '300px', display: isUpload ? 'block' : 'none' }}
aspectRatio={1 / 1} aspectRatio={1 / 1}
autoCropArea={1} autoCropArea={1}
guides guides
/> />
<img <img
alt="avatar" alt="avatar"
style={{ height: '300px', width: '300px', display: !isUpload ? 'flex' : 'none' }} style={{ height: '300px', width: '300px', display: !isUpload ? 'block' : 'none' }}
src={avatar || imageUrl || defaultAvatar} src={avatar || imageUrl || defaultAvatar}
/> />
<br/> <br/>
<Button type="primary" onClick={this.handleUpload} style={{display:isUpload ? 'flex' : 'none'}}> <Button type="primary" onClick={this.handleUpload} style={{display:isUpload ? 'inline-block' : 'none'}}>
<Icon type="check"/> <Format id="Upload-Avatar"/> <Icon type="check"/> <Format id="Upload-Avatar"/>
</Button> </Button>
<br/> <br/>
...@@ -133,7 +133,6 @@ class Profiles extends React.Component { ...@@ -133,7 +133,6 @@ class Profiles extends React.Component {
<label style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center' }}> <label style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Icon type="plus"/> <Icon type="plus"/>
<Format id="Change-Avatar" style={{display:isUpload ? 'flex' : 'none'}}/> <Format id="Change-Avatar" style={{display:isUpload ? 'flex' : 'none'}}/>
<Format id="Reselect-Avatar" style={{display:!isUpload ? 'flex' : 'none'}}/>
<input <input
type="file" onChange={this.onGetFile} ref={(file) => { type="file" onChange={this.onGetFile} ref={(file) => {
this.file = file; this.file = file;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment