This commit is contained in:
caishi 2021-06-08 14:56:00 +08:00
parent 2157f2ffe5
commit 39f0a165b6
4 changed files with 16 additions and 10 deletions

View File

@ -564,7 +564,7 @@ class NewHeader extends Component {
</img>
</a>
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
<li className="bor-bottom-greyE" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
<li className="bor-bottom-greyE task-hide" title={this.props.current_user.username} style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
{
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
return(

View File

@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import { Modal , Checkbox , Spin , Input } from 'antd';
import Axios from 'axios';
import { Link } from 'react-router-dom';
import { values } from 'lodash';
const { Search } = Input;
const limit = 20;

View File

@ -183,11 +183,17 @@ class Infos extends Component {
this.props.history.push(`/users/${user && user.login}/organizes`)
}
resetUser=()=>{
const { resetUserInfo } = this.props;
this.fetchUser();
resetUserInfo && resetUserInfo();
}
render() {
const { current_user, mygetHelmetapi } = this.props;
const { current_user, mygetHelmetapi , resetUserInfo } = this.props;
const { username } = this.props.match.params;
const { user, isSpin, project_type, route_type , undo_events , undo_messages , menuKey } = this.state;
return (
<div className="newMain clearfix">
<Spin spinning={isSpin}>
@ -336,7 +342,7 @@ class Infos extends Component {
<Route
path="/users/:username/info"
render={() => {
return <UpdateInfo {...this.props} {...this.state} resetUser={this.fetchUser}/>;
return <UpdateInfo {...this.props} {...this.state} resetUser={this.resetUser}/>;
}}
></Route>
<Route

View File

@ -10,15 +10,16 @@ export default Form.create()(
forwardRef((props)=>{
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
const { username } = props && props.match && props.match.params;
const { user , resetUser } = props;
const { user , resetUser , current_user } = props;
useEffect(()=>{
if(user && user.login){
if(current_user && current_user.login){
setFieldsValue({
...user,
location:user.province && [user.province,user.city]
...current_user,
location:current_user.province && [current_user.province,current_user.city]
})
}
},[user])
},[current_user])
function submit() {
validateFields((error,values)=>{