feat: 接口集合

This commit is contained in:
zwjamnsss 2017-08-11 21:10:54 +08:00
parent 6391618a39
commit 76df380a6c
3 changed files with 23 additions and 11 deletions

View File

@ -1,4 +1,11 @@
import React from 'react' import React, { Component } from 'react'
export default () => {
return <h1>hello colContent</h1> export default class InterfaceColContent extends Component {
} constructor(props) {
super(props)
}
render() {
return <h1>hello colContent</h1>
}
}

View File

@ -1,4 +1,10 @@
import React from 'react' import React, { Component } from 'react'
export default () => { export default class InterfaceColMenu extends Component {
return <h1>hello colContent</h1> constructor(props) {
} super(props)
}
render() {
return <h1>hello colContent</h1>
}
}

View File

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