diff --git a/data/menu.json b/data/menu.json index fd1a871..b3c1799 100644 --- a/data/menu.json +++ b/data/menu.json @@ -200,6 +200,13 @@ "icon": "", "spread": false, "children": [ + { + "title": "okMenu使用", + "path": "pages/use/use-okMenu.html", + "font": "layui-icon", + "icon": "", + "spread": false + }, { "title": "okTab使用", "path": "pages/use/use-okTab.html", diff --git a/pages/use/use-okMenu.html b/pages/use/use-okMenu.html new file mode 100644 index 0000000..fd2530e --- /dev/null +++ b/pages/use/use-okMenu.html @@ -0,0 +1,165 @@ + + + + + okMenu使用 + + + +
+ +
+ + 首页 + 框架使用 + okMenu使用 + + + + +
+
+ +
+ 菜单树json串 +
+ +
+{
+  "status": 1000,
+  "msg": "操作成功",
+  "data": {
+      "title": "多级菜单",
+      "path": "",
+      "font": "layui-icon",
+      "icon": "",
+      "spread": false,
+      "children": [
+        {
+          "title": "购物网站",
+          "path": "",
+          "font": "layui-icon",
+          "icon": "",
+          "spread": false,
+          "children": [
+            {
+              "title": "苏宁",
+              "path": "https://www.suning.com",
+              "font": "layui-icon",
+              "icon": "",
+              "spread": false
+            },
+            {
+              "title": "京东",
+              "path": "https://www.jd.com",
+              "font": "layui-icon",
+              "icon": "",
+              "spread": false
+            },
+            {
+              "title": "阿里",
+              "path": "",
+              "font": "layui-icon",
+              "icon": "",
+              "spread": false,
+              "children": [
+                {
+                  "title": "淘宝",
+                  "path": "https://www.taobao.com",
+                  "font": "layui-icon",
+                  "icon": "",
+                  "spread": false
+                },
+                {
+                  "title": "天猫",
+                  "path": "https://www.tmall.com",
+                  "font": "layui-icon",
+                  "icon": "",
+                  "spread": false
+                },
+                {
+                  "title": "聚划算",
+                  "path": "https://ju.taobao.com",
+                  "font": "layui-icon",
+                  "icon": "",
+                  "spread": false
+                }
+              ]
+            }
+          ]
+        },
+        {
+          "title": "新浪微博",
+          "path": "https://www.sina.com.cn",
+          "font": "layui-icon",
+          "icon": "",
+          "spread": false
+        },
+        {
+          "title": "搜索引擎",
+          "path": "",
+          "font": "layui-icon",
+          "icon": "",
+          "spread": false,
+          "children": [
+            {
+              "title": "百度",
+              "path": "https://www.baidu.com",
+              "font": "layui-icon",
+              "icon": "",
+              "spread": false
+            },
+            {
+              "title": "谷歌",
+              "path": "https://www.google.com",
+              "font": "layui-icon",
+              "icon": "",
+              "spread": false
+            },
+            {
+              "title": "360搜索",
+              "path": "https://www.so.com",
+              "font": "layui-icon",
+              "icon": "",
+              "spread": false
+            }
+          ]
+        },
+        {
+          "title": "搜狐",
+          "path": "http://www.sohu.com",
+          "font": "layui-icon",
+          "icon": "",
+          "spread": false
+        },
+        {
+          "title": "网易",
+          "path": "https://www.163.com",
+          "font": "layui-icon",
+          "icon": "",
+          "spread": false
+        }
+      ]
+    }
+}
+
+ + +
+ 调用生成菜单树 +
+ +
+// 生成左侧菜单树
+okMenu.generatorMenu("data/menu.json", "get");
+
+
+ + + + +