From 7a59d43eec09af3255d5996506ea4aa02bc5ceb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Mon, 28 Jun 2021 15:56:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B4=E9=83=A8=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/tpm/NewHeader.js | 6 ++++++ src/modules/tpm/css/headerExcess.css | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/modules/tpm/css/headerExcess.css diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js index f133e911..0c9f3f62 100644 --- a/src/modules/tpm/NewHeader.js +++ b/src/modules/tpm/NewHeader.js @@ -12,6 +12,7 @@ import 'antd/lib/checkbox/style/index.css'; import 'antd/lib/radio/style/index.css'; import 'antd/lib/input/style/index.css'; import './TPMIndex.css'; +import './css/headerExcess.css'; import logo from './images/logo.png'; const $ = window.$ @@ -573,11 +574,16 @@ class NewHeader extends Component { matchpaths = (url) => { const { match } = this.props; + console.log(url); + console.log(match); + if(url){ if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) { return true } else if (url.indexOf('projects') > -1 && match.path.indexOf('projects') > -1) { return true + } else if (url.indexOf('notice') > -1 && match.path.indexOf('notice') > -1) { + return true } else if (url.indexOf('users') > -1 && match.path.indexOf('users') > -1) { return true } else { diff --git a/src/modules/tpm/css/headerExcess.css b/src/modules/tpm/css/headerExcess.css new file mode 100644 index 00000000..08ee8377 --- /dev/null +++ b/src/modules/tpm/css/headerExcess.css @@ -0,0 +1,12 @@ +.head-nav ul#header-nav li:hover a, .head-nav ul#header-nav li.active a{ + color: #1484EF; +} +.head-nav ul#header-nav li.active a::after{ + content: ""; + width: 100%; + height:2px; + background-color: #1484EF; + left:0px; + bottom: 12px; + position: absolute; +} \ No newline at end of file