更新 profile.html

master
wangsiyuan 2023-12-25 23:13:59 +08:00
parent eaeeba42ef
commit 7e8cbf5aaa
1 changed files with 2 additions and 1 deletions

View File

@ -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');