fix: 解决view页面的冲突

This commit is contained in:
qitmac000249 2017-08-15 12:15:07 +08:00
commit f91db88593
3 changed files with 39 additions and 9 deletions

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
import '../interface.scss'
import React, { Component } from 'react'
import { connect } from 'react-redux'
@ -83,3 +84,32 @@ View.defaultProps = {
}
export default View
=======
import React,{Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux';
@connect(
state => {
return {
curdata: state.inter.curdata
}
}
)
class InterfaceView extends Component{
static propTypes = {
curdata: PropTypes.object
}
render(){
console.log(this.props.curdata)
let view = JSON.stringify(this.props.curdata, null, " ");
return <pre>
{view}
</pre>
}
}
export default InterfaceView;
>>>>>>> fe76f992f0b0251fce75b3fb564ace43565ab8b4

View File

@ -3,7 +3,7 @@
min-height: 5rem;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
background: #FFF;
border-radius:4px;
border-radius:5px;
margin: 3px;
.ant-tabs-bar{
border-bottom: none;
@ -41,9 +41,10 @@
width: 40px;
}
.btn-http-get{
background-color: #00a854;
border-color: #00a854
.interface-delete-icon{
position: absolute;
right: 5px;
top: 14px;
}
}
}
@ -53,7 +54,7 @@
min-height: 5rem;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
background: #FFF;
border-radius:4px;
border-radius:5px;
.interface-content{
.ant-tabs-nav{
width:100%

View File

@ -12,7 +12,7 @@ import { Setting } from './Setting/Setting.js'
@connect(
state => {
return {
curProject: state.project.curProject
curProject: state.project.currProject
}
},
{
@ -37,11 +37,10 @@ export default class Project extends Component {
render () {
const { match } = this.props;
console.log('project')
return (
<div>
<Subnav
default={'接口'}
default={'动态'}
data={[{
name: '接口',
path: `/project/${match.params.id}/interface`
@ -53,7 +52,7 @@ export default class Project extends Component {
path: `/project/${match.params.id}/activity`
}]}/>
<Switch>
<Redirect exact from ="/project/:id" to={`/project/${match.params.id}/activity`}/>
<Redirect exact from="/project/:id" to={`/project/${match.params.id}/activity`}/>
<Route path="/project/:id/activity" component={Activity} />
<Route path="/project/:id/interface" component={Interface} />
<Route path="/project/:id/setting" component={Setting} />