diff --git a/app/templates/profile.html b/app/templates/profile.html index 925494e..2ecf34a 100644 --- a/app/templates/profile.html +++ b/app/templates/profile.html @@ -68,7 +68,8 @@ menuList.empty(); menuItems.forEach(function (item) { - menuList.append('
  • ' + item.name + '
  • '); + var href = item.path || 'javascript:void(0);'; // 提供一个默认值 + menuList.append('
  • ' + item.name + '
  • '); }); layui.element.render('nav', 'test');