diff --git a/component/pear/module/menu.js b/component/pear/module/menu.js index 33cde7f4a024eb328d44ee98c8a633b33b786b27..b2843ab7ea7e6f74b4733e5b7139e07cdbccccbc 100644 --- a/component/pear/module/menu.js +++ b/component/pear/module/menu.js @@ -355,6 +355,15 @@ layui.define(['table', 'jquery', 'element'], function (exports) { } index++; + if( typeof item.children == 'undefined' || item.children.length == 0 ){ + item.children = [{ + "id": item.id, + "href": item.href, + "title": item.title, + "icon": item.icon, + "type":1, + }]; + } $.each(item.children, function (i, note) { // 创 建 每 一 个 菜 单 项 var content = '
  • ';