mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
fix: 二级导航偏移的bug
This commit is contained in:
parent
423f306d62
commit
2b7ffc7530
@ -13,7 +13,8 @@
|
||||
.logo {
|
||||
position: relative;
|
||||
float: left;
|
||||
line-height: .54rem;
|
||||
line-height: .56rem;
|
||||
height: .56rem;
|
||||
.href {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ class Subnav extends Component {
|
||||
className="g-row m-subnav-menu"
|
||||
>
|
||||
{this.props.data.map((item, index) => {
|
||||
// 若导航标题为两个字,则自动在中间加个空格
|
||||
if (item.name.length === 2) {
|
||||
item.name = item.name[0] + ' ' + item.name[1];
|
||||
}
|
||||
return (
|
||||
<Menu.Item className="item" key={item.name}>
|
||||
<Link to={item.path}>{this.props.data[index].name}</Link>
|
||||
|
@ -8,6 +8,7 @@
|
||||
border: none;
|
||||
.m-subnav-menu {
|
||||
border: none;
|
||||
padding: 0 .24rem;
|
||||
.item {
|
||||
line-height: .54rem;
|
||||
padding: 0 .36rem;
|
||||
|
Loading…
Reference in New Issue
Block a user