no message
This commit is contained in:
@@ -38,7 +38,6 @@ class App extends Component{
|
||||
</Switch>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
import React,{Comment} from "react";
|
||||
import React from "react";
|
||||
import {withRouter} from "react-router-dom";
|
||||
class Head extends React.Component{
|
||||
back=()=>{
|
||||
this.props.history.goBack()
|
||||
}
|
||||
forward=()=>{
|
||||
this.props.history.goForward()
|
||||
}
|
||||
go=()=>{
|
||||
this.props.history.go(-2)
|
||||
}
|
||||
render(){
|
||||
return(
|
||||
<div className="head">
|
||||
<h1>this is Hader</h1>
|
||||
<button onClick={this.back}>返回</button>
|
||||
<button onClick={this.forward}>前进</button>
|
||||
<button onClick={this.go}>退后2步</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default Head;
|
||||
export default withRouter(Head)
|
||||
@@ -26,5 +26,11 @@
|
||||
}
|
||||
|
||||
.mainContainer .content .head {
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.mainContainer .content .head button {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.mainContainer *{padding:0;margin:0;list-style:none}.mainContainer .nav{box-sizing:border-box;float:left;width:200px;height:100vh;padding:12px;border-right:1px solid #eee;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}.mainContainer .nav .hehe{color:red}.mainContainer .content{margin-left:210px}.mainContainer .content .head{border-bottom:1px solid #eee}
|
||||
.mainContainer *{padding:0;margin:0;list-style:none}.mainContainer .nav{box-sizing:border-box;float:left;width:200px;height:100vh;padding:12px;border-right:1px solid #eee;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start}.mainContainer .nav .hehe{color:red}.mainContainer .content{margin-left:210px}.mainContainer .content .head{box-sizing:border-box;padding-bottom:12px;border-bottom:1px solid #eee}.mainContainer .content .head button{margin-right:12px}
|
||||
|
||||
@@ -23,7 +23,12 @@
|
||||
.content{
|
||||
margin-left: 210px;
|
||||
.head{
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
button{
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user