mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
1923b475f5
@ -25,7 +25,8 @@ export default class AddColModal extends Component {
|
||||
fetchInterfaceColList: PropTypes.func,
|
||||
match: PropTypes.object,
|
||||
onOk: PropTypes.func,
|
||||
onCancel: PropTypes.func
|
||||
onCancel: PropTypes.func,
|
||||
caseName: PropTypes.string
|
||||
}
|
||||
|
||||
state = {
|
||||
@ -42,10 +43,12 @@ export default class AddColModal extends Component {
|
||||
|
||||
componentWillMount() {
|
||||
this.props.fetchInterfaceColList(this.props.match.params.id)
|
||||
this.setState({caseName: this.props.caseName})
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.setState({id: nextProps.interfaceColList[0]._id})
|
||||
this.setState({caseName: nextProps.caseName})
|
||||
}
|
||||
|
||||
addCol = async () => {
|
||||
|
@ -107,6 +107,7 @@ export default class Run extends Component {
|
||||
<Postman data={data} type="inter" saveTip="保存到集合" save={() => this.setState({saveCaseModalVisible: true})} ref={this.savePostmanRef} />
|
||||
<AddColModal
|
||||
visible={this.state.saveCaseModalVisible}
|
||||
caseName={currInterface.title}
|
||||
onCancel={() => this.setState({saveCaseModalVisible: false})}
|
||||
onOk={this.saveCase}
|
||||
></AddColModal>
|
||||
|
Loading…
Reference in New Issue
Block a user