From fe51a511a6374482063e7839e9acbf6717f3a925 Mon Sep 17 00:00:00 2001 From: chenxuan Date: Tue, 16 Apr 2024 14:51:08 +0800 Subject: [PATCH] no message --- chenxuan/src/App.js | 1 - chenxuan/src/pages/head.jsx | 17 +++++++++++++++-- chenxuan/src/pages/style.css | 6 ++++++ chenxuan/src/pages/style.min.css | 2 +- chenxuan/src/pages/style.scss | 5 +++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/chenxuan/src/App.js b/chenxuan/src/App.js index 0b7b0a5f0..424dd0ee1 100644 --- a/chenxuan/src/App.js +++ b/chenxuan/src/App.js @@ -38,7 +38,6 @@ class App extends Component{ - ) } } diff --git a/chenxuan/src/pages/head.jsx b/chenxuan/src/pages/head.jsx index 2f2ba1a84..fdc6019f0 100644 --- a/chenxuan/src/pages/head.jsx +++ b/chenxuan/src/pages/head.jsx @@ -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(

this is Hader

+ + +
) } } -export default Head; \ No newline at end of file +export default withRouter(Head) \ No newline at end of file diff --git a/chenxuan/src/pages/style.css b/chenxuan/src/pages/style.css index 8ce1506b7..12d7a00c5 100644 --- a/chenxuan/src/pages/style.css +++ b/chenxuan/src/pages/style.css @@ -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; +} diff --git a/chenxuan/src/pages/style.min.css b/chenxuan/src/pages/style.min.css index d27a2ce59..bc47c2afd 100644 --- a/chenxuan/src/pages/style.min.css +++ b/chenxuan/src/pages/style.min.css @@ -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} diff --git a/chenxuan/src/pages/style.scss b/chenxuan/src/pages/style.scss index 56793af94..6b3c15db3 100644 --- a/chenxuan/src/pages/style.scss +++ b/chenxuan/src/pages/style.scss @@ -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; + } } } } \ No newline at end of file