From 2a2743ffe72201518ebf0bbc32e8a3730e608fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Thu, 10 Sep 2020 14:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/module/tab.js | 50 ------------------------------------ 1 file changed, 50 deletions(-) diff --git a/component/pear/module/tab.js b/component/pear/module/tab.js index a398fef..c5c02e2 100644 --- a/component/pear/module/tab.js +++ b/component/pear/module/tab.js @@ -74,7 +74,6 @@ layui.define(['jquery', 'element'], function(exports) { autoLeft += $(this).outerWidth(); } }); - $tabTitle.animate({ scrollLeft: autoLeft - $tabTitle.width() / 3 }, 200); @@ -125,24 +124,16 @@ layui.define(['jquery', 'element'], function(exports) { '' + '' + '' - $("#" + elem).find(".pear-tab").append(load); - var pearLoad = $("#" + elem).find("#pear-tab-loading" + index); - pearLoad.css({ display: "block" }); - setTimeout(function() { - pearLoad.fadeOut(500); - }, time); - index++; } - element.tabAdd(elem, { title: title, content: '', id: opt.id }); - - } } element.tabChange(elem, opt.id); @@ -230,32 +206,22 @@ layui.define(['jquery', 'element'], function(exports) { '' $("#" + this.option.elem).find(".pear-tab").append(load); - var pearLoad = $("#" + this.option.elem).find("#pear-tab-loading" + index); - pearLoad.css({ display: "block" }); setTimeout(function() { - pearLoad.fadeOut(500); - }, time); - index++; } - - element.tabAdd(this.option.elem, { title: title, content: '', id: opt.id }); - - - } else { var isData = false; @@ -270,7 +236,6 @@ layui.define(['jquery', 'element'], function(exports) { return false; } - $.each($(".layui-tab[lay-filter='" + this.option.elem + "'] .layui-tab-title li[lay-id]"), function() { if ($(this).attr("lay-id") == opt.id) { @@ -289,19 +254,14 @@ layui.define(['jquery', 'element'], function(exports) { '' $("#" + this.option.elem).find(".pear-tab").append(load); - var pearLoad = $("#" + this.option.elem).find("#pear-tab-loading" + index); - pearLoad.css({ display: "block" }); setTimeout(function() { - pearLoad.fadeOut(500); - }, time); - index++; } @@ -311,8 +271,6 @@ layui.define(['jquery', 'element'], function(exports) { opt.url + '" style="width:100%;height:100%;">', id: opt.id }); - - } } element.tabChange(this.option.elem, opt.id); @@ -332,28 +290,20 @@ layui.define(['jquery', 'element'], function(exports) { '' var elem = this.option.elem; - $("#" + this.option.elem).find(".pear-tab").append(load); - var pearLoad = $("#" + this.option.elem).find("#pear-tab-loading" + index); - pearLoad.css({ display: "block" }); - index++; - setTimeout(function() { pearLoad.fadeOut(500,function(){ pearLoad.remove(); }); }, time); - $(".layui-tab[lay-filter='" + elem + "'] .layui-tab-content .layui-show").find("iframe")[0].contentWindow .location.reload(true); - } else { - $(".layui-tab[lay-filter='" + this.option.elem + "'] .layui-tab-content .layui-show").find("iframe")[0].contentWindow .location.reload(true); }