由于某种原因,下拉菜单在移动设备上打开后无法关闭,在开发工具中可以正常工作,但在移动设备上什么都没有?
<nav class="row navbar navbar-default mainmenu onebg">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapsed-navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand visible-xs-block" href="#">{{ $global['site_name'] }}</a>
</div>
<div class="collapse navbar-collapse" id="collapsed-navbar">
<ul class="nav menu navbar-nav onebg">
@each('cms::includes.navigationitem', $navigation, 'item')
</ul>
</div>
</div>
</nav>
这是菜单项包括
@if(isset($item['childNavPages']) && count($item['childNavPages']) > 0)
<li class="dropdown-submenu">
<a class="menuButton dropdown-toggle" data-toggle="dropdown" href="{{ $item->uri() }}">
<span data-acs-boldText="{{ $label }}">{{ $label }}</span>
{{-- make sure not to format this bit due to inline-block elements space issue--}}
<div class="visible-xs-block nav-caret"><i class="fas fa-caret-down" aria-hidden="true"></i></div>
<div class="hidden-xs nav-caret"><i class="fas fa-angle-right" aria-hidden="true"></i></div>
</a>
@if(!empty($item['childNavPages']))
<div class="submenu-wrapper">
<ul class="dropdown-menu" data-toggle="dropdown">
@foreach($item['childNavPages'] as $item)
@include('cms::includes.navigationitem')
@endforeach
</ul>
</div>
@endif
@else
<li class="dropdown-submenu">
<a class="menuButton dropdown-toggle" data-toggle="dropdown" href="{{ $item->uri() }}">
<span data-acs-boldText="{{ $label }}">{{ $label }}</span>
</a>
@endif
</li>