更新 profile.html
parent
eaeeba42ef
commit
7e8cbf5aaa
|
|
@ -68,7 +68,8 @@
|
|||
menuList.empty();
|
||||
|
||||
menuItems.forEach(function (item) {
|
||||
menuList.append('<li class="layui-nav-item"><a href="' + item.link + '">' + item.name + '</a></li>');
|
||||
var href = item.path || 'javascript:void(0);'; // 提供一个默认值
|
||||
menuList.append('<li class="layui-nav-item"><a href="' + href + '">' + item.name + '</a></li>');
|
||||
});
|
||||
|
||||
layui.element.render('nav', 'test');
|
||||
|
|
|
|||
Reference in New Issue