forked from Gitlink/forgeplus-react
修改头部选中样式
This commit is contained in:
commit
8162b8b908
|
@ -12,6 +12,7 @@ import 'antd/lib/checkbox/style/index.css';
|
||||||
import 'antd/lib/radio/style/index.css';
|
import 'antd/lib/radio/style/index.css';
|
||||||
import 'antd/lib/input/style/index.css';
|
import 'antd/lib/input/style/index.css';
|
||||||
import './TPMIndex.css';
|
import './TPMIndex.css';
|
||||||
|
import './css/headerExcess.css';
|
||||||
import logo from './images/logo.png';
|
import logo from './images/logo.png';
|
||||||
|
|
||||||
const $ = window.$
|
const $ = window.$
|
||||||
|
@ -573,11 +574,16 @@ class NewHeader extends Component {
|
||||||
|
|
||||||
matchpaths = (url) => {
|
matchpaths = (url) => {
|
||||||
const { match } = this.props;
|
const { match } = this.props;
|
||||||
|
console.log(url);
|
||||||
|
console.log(match);
|
||||||
|
|
||||||
if(url){
|
if(url){
|
||||||
if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) {
|
if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) {
|
||||||
return true
|
return true
|
||||||
} else if (url.indexOf('projects') > -1 && match.path.indexOf('projects') > -1) {
|
} else if (url.indexOf('projects') > -1 && match.path.indexOf('projects') > -1) {
|
||||||
return true
|
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) {
|
} else if (url.indexOf('users') > -1 && match.path.indexOf('users') > -1) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue