优化菜单展示

pull/1/head
wangziyangyang 2020-03-26 10:54:23 +08:00
parent f2c9423333
commit 32193978c2
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ layui.define(["element", "jquery"], function (exports) {
html += '<a href="javascript:;" class="layui-menu-tips" ><i style="width: 14px;" class="' + childMenu.icon + '"></i><span class="layui-left-nav"> ' + childMenu.name + '</span></a>'; html += '<a href="javascript:;" class="layui-menu-tips" ><i style="width: 14px;" class="' + childMenu.icon + '"></i><span class="layui-left-nav"> ' + childMenu.name + '</span></a>';
html = buildChildHtml(html, childMenu.children, menuParameId); html = buildChildHtml(html, childMenu.children, menuParameId);
} else { } else {
html += '<a href="javascript:;" class="layui-menu-tips" data-type="tabAdd" data-tab-mpi="m-p-i-' + menuParameId + '" data-tab="' + childMenu.url + '" target="' + childMenu.target + '"><i style="width: 14px;" class="' + childMenu.icon + '"></i><span class="layui-left-nav"> ' + childMenu.name + '</span></a>\n'; html += '<a href="javascript:;" class="layui-menu-tips" data-type="tabAdd" data-tab-mpi= "'+childMenu.name +'" data-tab="' + childMenu.url + '" target="' + childMenu.target + '"><i style="width: 14px;" class="' + childMenu.icon + '"></i><span class="layui-left-nav"> ' + childMenu.name + '</span></a>\n';
menuParameId++; menuParameId++;
window.menuParameId = menuParameId; window.menuParameId = menuParameId;
} }
@ -166,7 +166,7 @@ layui.define(["element", "jquery"], function (exports) {
}; };
leftMenuHtml = buildChildHtml(leftMenuHtml, menu.children, menuParameId); leftMenuHtml = buildChildHtml(leftMenuHtml, menu.children, menuParameId);
} else { } else {
leftMenuHtml += '<a href="javascript:;" class="layui-menu-tips" data-type="tabAdd" data-tab-mpi="m-p-i-' + menuParameId + '" data-tab="' + menu.url + '" target="' + menu.target + '"><i style="width: 14px;" class="' + menu.icon + '"></i><span class="layui-left-nav"> ' + menu.name + '</span></a>\n'; leftMenuHtml += '<a href="javascript:;" class="layui-menu-tips" data-type="tabAdd" data-tab-mpi="m-p-i-' + menuParameId + '" target="' + menu.target + '"><i style="width: 14px;" class="' + menu.icon + '"></i><span class="layui-left-nav"> ' + menu.name + '</span></a>\n';
menuParameId++; menuParameId++;
} }
leftMenuHtml += '</li>\n'; leftMenuHtml += '</li>\n';