mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-01 14:05:44 +08:00
opti: 用例保存 默认名
This commit is contained in:
parent
d2c8391246
commit
6e98c91bac
@ -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>
|
||||
|
@ -1 +1 @@
|
||||
module.exports = {qsso : require('plugins/yapi-plugin-qsso/client.js')}
|
||||
module.exports = {}
|
Loading…
Reference in New Issue
Block a user