From 477c3ade26b7065f6f0fdebba00020252d1be491 Mon Sep 17 00:00:00 2001 From: zhizou Date: Mon, 26 Aug 2019 17:41:59 +0800 Subject: [PATCH] fixed: tab(layui.okTab()) --- lib/layui/lay/okmodules/okTab.js | 6 +- pages/help/navOperate.html | 7 +- pages/operation.html | 193 ------------------------------- 3 files changed, 8 insertions(+), 198 deletions(-) delete mode 100644 pages/operation.html diff --git a/lib/layui/lay/okmodules/okTab.js b/lib/layui/lay/okmodules/okTab.js index 5b815d0..640a05a 100644 --- a/lib/layui/lay/okmodules/okTab.js +++ b/lib/layui/lay/okmodules/okTab.js @@ -534,7 +534,11 @@ layui.define(["element", "jquery"], function (exports) { }; exports("okTab", function (option) { - return new okTab().init(option); + if(parent.objOkTab){ + return parent.objOkTab; + }else{ + return new okTab().init(option); + } }); diff --git a/pages/help/navOperate.html b/pages/help/navOperate.html index abb7ac8..7249155 100644 --- a/pages/help/navOperate.html +++ b/pages/help/navOperate.html @@ -24,7 +24,7 @@
    layui.use(function(){
-      var okTab = parent.objOkTab;//获取父级的okTab
+      var okTab = parent.objOkTab;//获取父级的okTab;layui.okTab()不推荐这样获取
       var page = '<div lay-id="add-1" data-url="/pages/user/user.html">个人中心</div>';
       okTab.tabAdd(page);
    })
@@ -70,12 +70,11 @@
    }
 
 
-    
-    
-
-
-
-
-
-
-
- none -
-
-
0
-
收入
-
-
-
-
- -
-
-
-
- none -
-
-
0
-
商品
-
-
-
-
- -
-
-
-
- none -
-
-
0
-
博客
-
-
-
-
- -
-
-
-
- none -
-
-
0
-
用户
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
-

用户排行榜

- -
-
- none -
-
-

Visits

-
用户比例
-
-
-
-
-
- -
-
- none -
-
-

Visits

-
用户比例
-
-
-
-
-
- -
-
- none -
-
-

Visits

-
用户比例
-
-
-
-
-
- -
-
- none -
-
-

Visits

-
用户比例
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -