2017-07-18 12:53:53 +08:00
|
|
|
import React, { Component } from 'react'
|
|
|
|
import { Tabs } from 'antd'
|
2017-07-24 19:43:13 +08:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import PropTypes from 'prop-types'
|
2017-07-26 12:31:42 +08:00
|
|
|
|
2017-07-24 19:43:13 +08:00
|
|
|
@connect(
|
|
|
|
state => {
|
|
|
|
return {
|
|
|
|
resParams: state.addInterface.resParams,
|
|
|
|
reqParams: state.addInterface.reqParams
|
|
|
|
}
|
2017-07-18 12:53:53 +08:00
|
|
|
}
|
2017-07-24 19:43:13 +08:00
|
|
|
)
|
2017-07-18 12:53:53 +08:00
|
|
|
|
2017-07-24 19:43:13 +08:00
|
|
|
class Result extends Component {
|
|
|
|
static propTypes = {
|
|
|
|
resParams: PropTypes.string,
|
2017-07-25 14:35:46 +08:00
|
|
|
reqParams: PropTypes.string,
|
2017-07-26 12:31:42 +08:00
|
|
|
isSave: PropTypes.bool,
|
|
|
|
mockJson: PropTypes.string
|
2017-07-18 12:53:53 +08:00
|
|
|
}
|
|
|
|
|
2017-07-24 19:43:13 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
|
|
|
}
|
2017-07-18 12:53:53 +08:00
|
|
|
|
2017-07-24 19:43:13 +08:00
|
|
|
render () {
|
2017-07-26 12:31:42 +08:00
|
|
|
const TabPane = Tabs.TabPane
|
|
|
|
const { mockJson } = this.props
|
2017-07-26 19:07:29 +08:00
|
|
|
|
2017-07-18 12:53:53 +08:00
|
|
|
return (
|
|
|
|
<div className="result">
|
2017-07-24 19:43:13 +08:00
|
|
|
<Tabs defaultActiveKey="1">
|
2017-07-18 12:53:53 +08:00
|
|
|
<TabPane tab="成功结果" key="1">
|
2017-07-26 12:31:42 +08:00
|
|
|
<pre>{mockJson}</pre>
|
2017-07-18 12:53:53 +08:00
|
|
|
</TabPane>
|
|
|
|
</Tabs>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-24 19:43:13 +08:00
|
|
|
export default Result
|