Skip to content

Commit

Permalink
修复在菜单mobile模式下不能正确切换问题
Browse files Browse the repository at this point in the history
  • Loading branch information
25juan committed Mar 30, 2020
1 parent 6731e1b commit d269036
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions css/layuimini.css
Original file line number Diff line number Diff line change
Expand Up @@ -825,5 +825,6 @@
}
.popup-tips .layui-nav-tree{
width: 150px;
border-radius: 10px;
}

2 changes: 1 addition & 1 deletion js/lay-module/layuimini/miniAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
tips = $(this).prop("innerHTML"),
isShow = $('.layuimini-tool i').attr('data-side-fold');
if (isShow == 0 && tips) {
tips = "<ul class='layui-nav layui-nav-tree layui-this'><li class='layui-nav-item '>"+tips+"</li></ul>" ;
tips = "<ul class='layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>"+tips+"</li></ul>" ;
window.openTips = layer.tips(tips, $(this), {
tips: [2, '#2f4056'],
time: 300000,
Expand Down
4 changes: 2 additions & 2 deletions js/lay-module/layuimini/miniMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
compileMenu: function(menu,isSub){
var menuHtml = '<li {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} class="layui-nav-item menu-li {{d.className}}" {{#if( d.id){ }} id="{{d.id}}" {{#}}}> <a {{#if( d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}} href="javascript:;">{{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav">{{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}} </li>' ;
if(isSub){
menuHtml = '<dd class="menu-dd {{d.className }}"> <a href="javascript:;" {{#if(( !d.child || !d.child.length ) && d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}}> {{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav"> {{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}}</dd>'
menuHtml = '<dd class="menu-dd {{d.className }}"> <a href="javascript:;" {{#if( d.menu){ }} data-menu="{{d.menu}}" {{#}}} {{#if( d.id){ }} id="{{d.id}}" {{#}}} {{#if(( !d.child || !d.child.length ) && d.href){ }} layuimini-href="{{d.href}}" {{#}}} {{#if( d.target){ }} target="{{d.target}}" {{#}}}> {{#if( d.icon){ }} <i class="{{d.icon}}"></i> {{#}}} <span class="layui-left-nav"> {{d.title}}</span></a> {{# if(d.children){}} {{d.children}} {{#}}}</dd>'
}
return laytpl(menuHtml).render(menu);
},
Expand Down Expand Up @@ -142,7 +142,7 @@ layui.define(["element","laytpl" ,"jquery"], function (exports) {
parentMenuId:menu,
leftMenuCheckDefault:leftMenuCheckDefault
});
headerMobileMenuHtml +=me.compileMenu({ id:id,menu:menu,icon:val.icon, title:val.title, },true);
headerMobileMenuHtml +=me.compileMenu({ id:id,menu:menu,id:id,icon:val.icon, title:val.title, },true);
headerMenuCheckDefault = "";
leftMenuCheckDefault = "layui-hide" ;
return topMenuItemHtml ;
Expand Down

0 comments on commit d269036

Please sign in to comment.