diff --git a/admin/data/menu.json b/admin/data/menu.json index 30eff4d..bbd0367 100644 --- a/admin/data/menu.json +++ b/admin/data/menu.json @@ -35,7 +35,7 @@ "href": "", "children": [{ "id": 201, - "title": "基础组件", + "title": "基础组件 宽度测试", "icon": "layui-icon layui-icon-console", "type": 0, "children": [{ diff --git a/component/pear/module/menu.js b/component/pear/module/menu.js index 97f0801..76aefd1 100644 --- a/component/pear/module/menu.js +++ b/component/pear/module/menu.js @@ -375,7 +375,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) { topLength = height-thisHeight-10; } if (!$(this).is(".layui-nav-item")) { - var left = $(this).offset().left + 132; + var left = $(this).offset().left + $(this).width()+2; $(this).children(".layui-nav-child").offset({ left: left });