|
@@ -19,7 +19,7 @@ const Avatar = React.createClass({
|
|
|
}
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
- if (this.props.id != nextProps.id) {
|
|
|
+ if (this.props.visible && !nextProps.visible) {
|
|
|
this.state.imageUrl = null;
|
|
|
};
|
|
|
},
|
|
@@ -328,7 +328,7 @@ const Lecture = React.createClass({
|
|
|
onChange={(e) => { this.setState({ searchKey: e }) }}>
|
|
|
{this.state.keysOption}
|
|
|
</Select>
|
|
|
- <Button type="primary" onClick={this.loadData}>搜索</Button>
|
|
|
+ <Button type="primary" onClick={() => { this.loadData() }}>搜索</Button>
|
|
|
<Button type="ghost" onClick={this.clearCache}>清除缓存</Button>
|
|
|
<Button onClick={this.reset}>重置</Button>
|
|
|
<Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
|
|
@@ -351,7 +351,7 @@ const Lecture = React.createClass({
|
|
|
visible={this.state.visible}
|
|
|
maskClosable={false}
|
|
|
footer={null}
|
|
|
- afterClose={() => { this.state.RowData = {} }}
|
|
|
+ afterClose={() => { this.state.RowData = {}; }}
|
|
|
onCancel={() => { this.setState({ visible: false }) }} >
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<div className="modal-box">
|
|
@@ -439,6 +439,7 @@ const Lecture = React.createClass({
|
|
|
<div className="modal-box-detail clearfix">
|
|
|
<Avatar sign={this.state.RowData.sign} id={this.state.RowData.id}
|
|
|
imageUrl={this.state.RowData.imgurl ? (globalConfig.avatarHost + "/upload" + this.state.RowData.imgurl) : null}
|
|
|
+ visible={this.state.visible}
|
|
|
urlData={(url) => { this.state.RowData.imgurl = url }} />
|
|
|
</div>
|
|
|
</div>
|