2024-10-29 18:29:56 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh-CN">
|
2024-11-01 18:21:57 +08:00
|
|
|
|
2024-10-29 18:29:56 +08:00
|
|
|
<head>
|
2024-11-01 18:21:57 +08:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>基础菜单 - Layui</title>
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link rel="stylesheet" href="/layui/css/layui.css">
|
2024-10-29 18:29:56 +08:00
|
|
|
</head>
|
|
|
|
|
2024-11-01 18:21:57 +08:00
|
|
|
<body class="layui-bg-gray">
|
|
|
|
<div id="header"></div>
|
|
|
|
<div class="layui-panel" style="width: 260px; margin: 16px;">
|
|
|
|
<ul class="layui-menu" id="demo-menu">
|
|
|
|
<li lay-options="{id: 100}">
|
|
|
|
<div class="layui-menu-body-title"><a href="javascript:;">menu item 1</a></div>
|
|
|
|
</li>
|
|
|
|
<li lay-options="{id: 101}">
|
|
|
|
<div class="layui-menu-body-title">
|
|
|
|
<a href="javascript:;">menu item 2 <span class="layui-badge-dot"></span></a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="layui-menu-item-divider"></li>
|
|
|
|
<li class="layui-menu-item-group layui-menu-item-down" lay-options="{type: 'group'}">
|
|
|
|
<div class="layui-menu-body-title">
|
|
|
|
menu group <i class="layui-icon layui-icon-up"></i>
|
|
|
|
</div>
|
|
|
|
<ul>
|
|
|
|
<li lay-options="{id: 103}">
|
|
|
|
<div class="layui-menu-body-title">menu item 3-1</div>
|
|
|
|
</li>
|
|
|
|
<li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: false}">
|
|
|
|
<div class="layui-menu-body-title">menu group 2</div>
|
|
|
|
<ul>
|
|
|
|
<li class="layui-menu-item-checked">
|
|
|
|
<div class="layui-menu-body-title">menu item 3-2-1</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 3-2-2</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 3-3</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="layui-menu-item-divider"></li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 4 <span class="layui-badge">1</span></div>
|
|
|
|
</li>
|
2024-10-30 18:27:37 +08:00
|
|
|
<li>
|
2024-11-01 18:21:57 +08:00
|
|
|
<div class="layui-menu-body-title">menu item 5</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 6</div>
|
|
|
|
</li>
|
|
|
|
<li class="layui-menu-item-parent" lay-options="{type: 'parent'}">
|
|
|
|
<div class="layui-menu-body-title">
|
|
|
|
menu item 7 Children
|
|
|
|
<i class="layui-icon layui-icon-right"></i>
|
|
|
|
</div>
|
|
|
|
<div class="layui-panel layui-menu-body-panel">
|
|
|
|
<ul>
|
|
|
|
<li class="layui-menu-item-parent" lay-options="{type: 'parent'}">
|
|
|
|
<div class="layui-menu-body-title">
|
|
|
|
menu item 7-1
|
|
|
|
<i class="layui-icon layui-icon-right"></i>
|
|
|
|
</div>
|
|
|
|
<div class="layui-panel layui-menu-body-panel">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 7-2-1</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 7-2-2</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 7-2-3</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 7-2-4</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 7-2</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 7-3</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>menu item 8</li>
|
|
|
|
<li class="layui-menu-item-divider"></li>
|
|
|
|
<li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: false}">
|
|
|
|
<div class="layui-menu-body-title">menu group 9</div>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 9-1</div>
|
|
|
|
</li>
|
|
|
|
<li class="layui-menu-item-parent" lay-options="{type: 'parent'}">
|
|
|
|
<div class="layui-menu-body-title">
|
|
|
|
menu item 9-2
|
|
|
|
<i class="layui-icon layui-icon-right"></i>
|
|
|
|
</div>
|
|
|
|
<div class="layui-panel layui-menu-body-panel">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 9-2-1</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 9-2-2</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 9-2-3</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 9-31</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="layui-menu-item-divider"></li>
|
|
|
|
<li>
|
|
|
|
<div class="layui-menu-body-title">menu item 10</div>
|
2024-10-30 18:27:37 +08:00
|
|
|
</li>
|
|
|
|
</ul>
|
2024-11-01 18:21:57 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="/js/jquery-3.2.1.js"></script>
|
|
|
|
<script src="/js/CommonConfig.js"></script>
|
|
|
|
<script>
|
|
|
|
headerModel = 4;
|
2024-10-29 18:29:56 +08:00
|
|
|
$('#header').load("/html/header.html");
|
2024-11-01 18:21:57 +08:00
|
|
|
</script>
|
|
|
|
<script src="/layui/layui.js"></script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
// loadHeader($('#header').get(0))
|
|
|
|
layui.use(function () {
|
|
|
|
var dropdown = layui.dropdown;
|
|
|
|
var layer = layui.layer;
|
|
|
|
var util = layui.util;
|
|
|
|
// 菜单点击事件
|
|
|
|
dropdown.on('click(demo-menu)', function (options) {
|
|
|
|
console.log(this, options);
|
|
|
|
|
|
|
|
// 显示 - 仅用于演示
|
|
|
|
layer.msg(util.escape(JSON.stringify(options)));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
</body>
|
2024-10-30 18:27:37 +08:00
|
|
|
|
2024-10-29 18:29:56 +08:00
|
|
|
</html>
|