更新 profile.html

This commit is contained in:
2023-12-25 23:13:59 +08:00
parent eaeeba42ef
commit 7e8cbf5aaa

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