新建分支需要刷新

This commit is contained in:
caishi 2020-07-03 17:26:07 +08:00
parent 2dca31f6c6
commit fccabebc59
2 changed files with 5 additions and 11 deletions

View File

@ -94,7 +94,7 @@ class CoderRootIndex extends Component{
></Route>
<Route path="/projects/:projectsId/coders/:branch/newfile"
render={
(props) => (<FileNew {...this.props} {...props} {...this.state} />)
(props) => (<FileNew {...this.props} {...props} {...this.state} getTopCount={this.getTopCount} />)
}
></Route>
<Route path="/projects/:projectsId/coders/commit"

View File

@ -50,15 +50,15 @@ class UserSubmitComponent extends Component {
.then((result) => {
this.setState({ isSpin: false });
if (result.data && result.data.name) {
let url = values.branchname
? `/projects/${projectsId}/coders?branch=${values.branchname}`
: `/projects/${projectsId}/coders`;
this.props.history.push(url);
this.props.showNotification("文件新建成功!");
if(submitType === "1"){
const { getTopCount } = this.props;
getTopCount && getTopCount(values.branchname);
}
let url = values.branchname
? `/projects/${projectsId}/coders?branch=${values.branchname}`
: `/projects/${projectsId}/coders`;
this.props.history.push(url);
}
})
.catch((error) => {
@ -175,12 +175,6 @@ class UserSubmitComponent extends Component {
{getFieldDecorator("path", {
rules: [],
})(
// <Input
// placeholder={`/${
// projectDetail && projectDetail.identifier
// }${filepath}`}
// readOnly
// />
<div className="setInputAddon">
<Input
addonBefore={`/${