修复Layer全局污染的问题
修复错误提交的插件配置 修复iOS下页面底部点击的BUG 优化弹出窗无标题时关闭按钮的显示
正在显示
8 个修改的文件
包含
183 行增加
和
164 行删除
@@ -50,6 +50,13 @@ body.is-dialog { | @@ -50,6 +50,13 @@ body.is-dialog { | ||
50 | /*width: 70%;*/ | 50 | /*width: 70%;*/ |
51 | max-width: 885px; | 51 | max-width: 885px; |
52 | } | 52 | } |
53 | +/*iOS兼容*/ | ||
54 | +html.ios-fix, | ||
55 | +html.ios-fix body { | ||
56 | + height: 100%; | ||
57 | + overflow: auto; | ||
58 | + -webkit-overflow-scrolling: touch; | ||
59 | +} | ||
53 | .content { | 60 | .content { |
54 | min-height: 500px; | 61 | min-height: 500px; |
55 | } | 62 | } |
@@ -70,15 +77,6 @@ body.is-dialog { | @@ -70,15 +77,6 @@ body.is-dialog { | ||
70 | height: 100%; | 77 | height: 100%; |
71 | width: 100%; | 78 | width: 100%; |
72 | } | 79 | } |
73 | -.tab-addtabs.ios-iframe-fix .tab-pane { | ||
74 | - -webkit-overflow-scrolling: touch; | ||
75 | - overflow: auto; | ||
76 | -} | ||
77 | -.layui-layer-iframe .layui-layer-content.ios-iframe-fix { | ||
78 | - -webkit-overflow-scrolling: touch; | ||
79 | - overflow: auto; | ||
80 | - overflow-y: auto!important; | ||
81 | -} | ||
82 | @media only screen and (min-width: 481px) { | 80 | @media only screen and (min-width: 481px) { |
83 | .row-flex { | 81 | .row-flex { |
84 | display: flex; | 82 | display: flex; |
@@ -576,59 +574,59 @@ table.table-template { | @@ -576,59 +574,59 @@ table.table-template { | ||
576 | -moz-box-shadow: 0 0 3px #eee; | 574 | -moz-box-shadow: 0 0 3px #eee; |
577 | box-shadow: 0 0 3px #eee; | 575 | box-shadow: 0 0 3px #eee; |
578 | } | 576 | } |
579 | -.layui-layer-title { | 577 | +.layui-layer-fast { |
578 | + /*自定义底部灰色操作区*/ | ||
579 | +} | ||
580 | +.layui-layer-fast .layui-layer-title { | ||
580 | background: #2c3e50!important; | 581 | background: #2c3e50!important; |
581 | color: #fff!important; | 582 | color: #fff!important; |
583 | + border-bottom: none; | ||
582 | } | 584 | } |
583 | -/*避免出现多滚动条*/ | ||
584 | -.layui-layer-noborder { | 585 | +.layui-layer-fast .layui-layer-title ~ .layui-layer-setwin { |
586 | + top: 0px; | ||
587 | + height: 42px; | ||
588 | +} | ||
589 | +.layui-layer-fast .layui-layer-title ~ .layui-layer-setwin > a { | ||
590 | + height: 42px; | ||
591 | + line-height: 42px; | ||
592 | + display: inline-block; | ||
593 | +} | ||
594 | +.layui-layer-fast.layui-layer-border { | ||
585 | border: none!important; | 595 | border: none!important; |
586 | box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important; | 596 | box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important; |
587 | } | 597 | } |
588 | -.layui-layer-moves { | 598 | +.layui-layer-fast .layui-layer-moves { |
589 | -webkit-box-sizing: content-box; | 599 | -webkit-box-sizing: content-box; |
590 | -moz-box-sizing: content-box; | 600 | -moz-box-sizing: content-box; |
591 | box-sizing: content-box; | 601 | box-sizing: content-box; |
592 | } | 602 | } |
593 | -.layui-layer-iframe { | ||
594 | - overflow: hidden!important; | ||
595 | -} | ||
596 | -.layui-layer-iframe .layui-layer-content { | ||
597 | - -webkit-overflow-scrolling: touch; | ||
598 | - overflow-y: hidden!important; | ||
599 | - overflow: hidden; | ||
600 | -} | ||
601 | -/*自定义底部灰色操作区*/ | ||
602 | -.layui-layer-btn { | 603 | +.layui-layer-fast .layui-layer-btn { |
603 | text-align: center!important; | 604 | text-align: center!important; |
604 | padding: 10px!important; | 605 | padding: 10px!important; |
605 | background: #ecf0f1; | 606 | background: #ecf0f1; |
606 | } | 607 | } |
607 | -.layui-layer-footer { | ||
608 | - padding: 8px 20px; | ||
609 | - background-color: #ecf0f1; | ||
610 | - height: auto; | ||
611 | - text-align: inherit!important; | ||
612 | -} | ||
613 | -.layui-layer-btn a { | 608 | +.layui-layer-fast .layui-layer-btn a { |
614 | background-color: #95a5a6!important; | 609 | background-color: #95a5a6!important; |
615 | border-color: #95a5a6!important; | 610 | border-color: #95a5a6!important; |
616 | color: #fff!important; | 611 | color: #fff!important; |
617 | } | 612 | } |
618 | -.layui-layer-btn .layui-layer-btn0 { | 613 | +.layui-layer-fast .layui-layer-btn .layui-layer-btn0 { |
619 | background-color: #18bc9c!important; | 614 | background-color: #18bc9c!important; |
620 | border-color: #18bc9c!important; | 615 | border-color: #18bc9c!important; |
621 | } | 616 | } |
622 | -.layui-layer-setwin { | ||
623 | - top: 10px!important; | 617 | +.layui-layer-fast .layui-layer-footer { |
618 | + padding: 8px 20px; | ||
619 | + background-color: #ecf0f1; | ||
620 | + height: auto; | ||
621 | + text-align: inherit!important; | ||
624 | } | 622 | } |
625 | -.layui-layer-setwin > a { | 623 | +.layui-layer-fast .layui-layer-setwin > a { |
626 | background: none!important; | 624 | background: none!important; |
627 | } | 625 | } |
628 | -.layui-layer-setwin > a cite { | 626 | +.layui-layer-fast .layui-layer-setwin > a cite { |
629 | display: none; | 627 | display: none; |
630 | } | 628 | } |
631 | -.layui-layer-setwin > a:after { | 629 | +.layui-layer-fast .layui-layer-setwin > a:after { |
632 | content: "\e625"; | 630 | content: "\e625"; |
633 | font-family: iconfont; | 631 | font-family: iconfont; |
634 | font-style: normal; | 632 | font-style: normal; |
@@ -640,31 +638,42 @@ table.table-template { | @@ -640,31 +638,42 @@ table.table-template { | ||
640 | margin: 0; | 638 | margin: 0; |
641 | z-index: 1; | 639 | z-index: 1; |
642 | } | 640 | } |
643 | -.layui-layer-setwin > a:hover { | 641 | +.layui-layer-fast .layui-layer-setwin > a:hover { |
644 | text-decoration: none!important; | 642 | text-decoration: none!important; |
645 | background: none!important; | 643 | background: none!important; |
646 | } | 644 | } |
647 | -.layui-layer-setwin > a:focus { | 645 | +.layui-layer-fast .layui-layer-setwin > a:focus { |
648 | text-decoration: none!important; | 646 | text-decoration: none!important; |
649 | } | 647 | } |
650 | -.layui-layer-setwin .layui-layer-min:after { | 648 | +.layui-layer-fast .layui-layer-setwin .layui-layer-min { |
649 | + display: none; | ||
650 | +} | ||
651 | +.layui-layer-fast .layui-layer-setwin .layui-layer-min:after { | ||
651 | content: "\e625"; | 652 | content: "\e625"; |
652 | } | 653 | } |
653 | -.layui-layer-setwin .layui-layer-max:after { | 654 | +.layui-layer-fast .layui-layer-setwin .layui-layer-max { |
655 | + display: none; | ||
656 | +} | ||
657 | +.layui-layer-fast .layui-layer-setwin .layui-layer-max:after { | ||
654 | content: "\e623"; | 658 | content: "\e623"; |
655 | } | 659 | } |
656 | -.layui-layer-setwin .layui-layer-maxmin:after { | 660 | +.layui-layer-fast .layui-layer-setwin .layui-layer-maxmin { |
661 | + display: none; | ||
662 | +} | ||
663 | +.layui-layer-fast .layui-layer-setwin .layui-layer-maxmin:after { | ||
657 | content: "\e624"; | 664 | content: "\e624"; |
658 | } | 665 | } |
659 | -.layui-layer-setwin .layui-layer-close1:after { | 666 | +.layui-layer-fast .layui-layer-setwin .layui-layer-close1:after { |
660 | content: "\e626"; | 667 | content: "\e626"; |
661 | } | 668 | } |
662 | -.layui-layer-setwin .layui-layer-close2, | ||
663 | -.layui-layer-setwin .layui-layer-close2:hover { | 669 | +.layui-layer-fast .layui-layer-setwin .layui-layer-close2, |
670 | +.layui-layer-fast .layui-layer-setwin .layui-layer-close2:hover { | ||
664 | background: url('../libs/layer/build/skin/default/icon.png') no-repeat -149px -31px !important; | 671 | background: url('../libs/layer/build/skin/default/icon.png') no-repeat -149px -31px !important; |
672 | + top: -30px; | ||
673 | + right: -30px; | ||
665 | } | 674 | } |
666 | -.layui-layer-setwin .layui-layer-close2:after, | ||
667 | -.layui-layer-setwin .layui-layer-close2:hover:after { | 675 | +.layui-layer-fast .layui-layer-setwin .layui-layer-close2:after, |
676 | +.layui-layer-fast .layui-layer-setwin .layui-layer-close2:hover:after { | ||
668 | display: none; | 677 | display: none; |
669 | } | 678 | } |
670 | @media (min-width: 768px) { | 679 | @media (min-width: 768px) { |
此 diff 太大无法显示。
@@ -66,6 +66,10 @@ define(['fast', 'moment'], function (Fast, Moment) { | @@ -66,6 +66,10 @@ define(['fast', 'moment'], function (Fast, Moment) { | ||
66 | }, | 66 | }, |
67 | init: function () { | 67 | init: function () { |
68 | //公共代码 | 68 | //公共代码 |
69 | + //添加ios-fix兼容iOS下的iframe | ||
70 | + if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){ | ||
71 | + $("html").addClass("ios-fix"); | ||
72 | + } | ||
69 | //配置Toastr的参数 | 73 | //配置Toastr的参数 |
70 | Toastr.options.positionClass = Config.controllername === 'index' ? "toast-top-right-index" : "toast-top-right"; | 74 | Toastr.options.positionClass = Config.controllername === 'index' ? "toast-top-right-index" : "toast-top-right"; |
71 | //点击包含.btn-dialog的元素时弹出dialog | 75 | //点击包含.btn-dialog的元素时弹出dialog |
@@ -181,11 +181,6 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi | @@ -181,11 +181,6 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi | ||
181 | //绑定tabs事件 | 181 | //绑定tabs事件 |
182 | $('#nav').addtabs({iframeHeight: "100%"}); | 182 | $('#nav').addtabs({iframeHeight: "100%"}); |
183 | 183 | ||
184 | - //修复iOS下iframe无法滚动的BUG | ||
185 | - if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { | ||
186 | - $(".tab-addtabs").addClass("ios-iframe-fix"); | ||
187 | - } | ||
188 | - | ||
189 | if ($("ul.sidebar-menu li.active a").size() > 0) { | 184 | if ($("ul.sidebar-menu li.active a").size() > 0) { |
190 | $("ul.sidebar-menu li.active a").trigger("click"); | 185 | $("ul.sidebar-menu li.active a").trigger("click"); |
191 | } else { | 186 | } else { |
@@ -126,7 +126,6 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | @@ -126,7 +126,6 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | ||
126 | area: area, | 126 | area: area, |
127 | content: url, | 127 | content: url, |
128 | zIndex: Layer.zIndex, | 128 | zIndex: Layer.zIndex, |
129 | - skin: 'layui-layer-noborder', | ||
130 | success: function (layero, index) { | 129 | success: function (layero, index) { |
131 | var that = this; | 130 | var that = this; |
132 | //存储callback事件 | 131 | //存储callback事件 |
@@ -159,9 +158,9 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | @@ -159,9 +158,9 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | ||
159 | } | 158 | } |
160 | } | 159 | } |
161 | }, options ? options : {}); | 160 | }, options ? options : {}); |
162 | - if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0) { | 161 | + if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0)) { |
163 | options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"]; | 162 | options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"]; |
164 | - options.offset = [ top.$(".tab-pane.active").scrollTop() + "px", "0px"]; | 163 | + options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"]; |
165 | } | 164 | } |
166 | Layer.open(options); | 165 | Layer.open(options); |
167 | return false; | 166 | return false; |
@@ -205,7 +204,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | @@ -205,7 +204,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | ||
205 | if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { | 204 | if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { |
206 | var titHeight = layero.find('.layui-layer-title').outerHeight() || 0; | 205 | var titHeight = layero.find('.layui-layer-title').outerHeight() || 0; |
207 | var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; | 206 | var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; |
208 | - $("iframe", layero).parent().addClass("ios-iframe-fix").css("height", layero.height() - titHeight - btnHeight); | 207 | + $("iframe", layero).parent().css("height", layero.height() - titHeight - btnHeight); |
209 | $("iframe", layero).css("height", "100%"); | 208 | $("iframe", layero).css("height", "100%"); |
210 | } | 209 | } |
211 | }, | 210 | }, |
@@ -282,6 +281,9 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | @@ -282,6 +281,9 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine | ||
282 | setting.url = Fast.api.fixurl(setting.url); | 281 | setting.url = Fast.api.fixurl(setting.url); |
283 | } | 282 | } |
284 | }); | 283 | }); |
284 | + Layer.config({ | ||
285 | + skin: 'layui-layer-fast' | ||
286 | + }); | ||
285 | // 绑定ESC关闭窗口事件 | 287 | // 绑定ESC关闭窗口事件 |
286 | $(window).keyup(function (e) { | 288 | $(window).keyup(function (e) { |
287 | if (e.keyCode == 27) { | 289 | if (e.keyCode == 27) { |
@@ -2051,7 +2051,6 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2051,7 +2051,6 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2051 | area: area, | 2051 | area: area, |
2052 | content: url, | 2052 | content: url, |
2053 | zIndex: Layer.zIndex, | 2053 | zIndex: Layer.zIndex, |
2054 | - skin: 'layui-layer-noborder', | ||
2055 | success: function (layero, index) { | 2054 | success: function (layero, index) { |
2056 | var that = this; | 2055 | var that = this; |
2057 | //存储callback事件 | 2056 | //存储callback事件 |
@@ -2084,9 +2083,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2084,9 +2083,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2084 | } | 2083 | } |
2085 | } | 2084 | } |
2086 | }, options ? options : {}); | 2085 | }, options ? options : {}); |
2087 | - if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0) { | 2086 | + if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0)) { |
2088 | options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"]; | 2087 | options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"]; |
2089 | - options.offset = [ top.$(".tab-pane.active").scrollTop() + "px", "0px"]; | 2088 | + options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"]; |
2090 | } | 2089 | } |
2091 | Layer.open(options); | 2090 | Layer.open(options); |
2092 | return false; | 2091 | return false; |
@@ -2130,7 +2129,7 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2130,7 +2129,7 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2130 | if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { | 2129 | if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { |
2131 | var titHeight = layero.find('.layui-layer-title').outerHeight() || 0; | 2130 | var titHeight = layero.find('.layui-layer-title').outerHeight() || 0; |
2132 | var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; | 2131 | var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; |
2133 | - $("iframe", layero).parent().addClass("ios-iframe-fix").css("height", layero.height() - titHeight - btnHeight); | 2132 | + $("iframe", layero).parent().css("height", layero.height() - titHeight - btnHeight); |
2134 | $("iframe", layero).css("height", "100%"); | 2133 | $("iframe", layero).css("height", "100%"); |
2135 | } | 2134 | } |
2136 | }, | 2135 | }, |
@@ -2207,6 +2206,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2207,6 +2206,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2207 | setting.url = Fast.api.fixurl(setting.url); | 2206 | setting.url = Fast.api.fixurl(setting.url); |
2208 | } | 2207 | } |
2209 | }); | 2208 | }); |
2209 | + Layer.config({ | ||
2210 | + skin: 'layui-layer-fast' | ||
2211 | + }); | ||
2210 | // 绑定ESC关闭窗口事件 | 2212 | // 绑定ESC关闭窗口事件 |
2211 | $(window).keyup(function (e) { | 2213 | $(window).keyup(function (e) { |
2212 | if (e.keyCode == 27) { | 2214 | if (e.keyCode == 27) { |
@@ -6775,6 +6777,10 @@ define('backend',['fast', 'moment'], function (Fast, Moment) { | @@ -6775,6 +6777,10 @@ define('backend',['fast', 'moment'], function (Fast, Moment) { | ||
6775 | }, | 6777 | }, |
6776 | init: function () { | 6778 | init: function () { |
6777 | //公共代码 | 6779 | //公共代码 |
6780 | + //添加ios-fix兼容iOS下的iframe | ||
6781 | + if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){ | ||
6782 | + $("html").addClass("ios-fix"); | ||
6783 | + } | ||
6778 | //配置Toastr的参数 | 6784 | //配置Toastr的参数 |
6779 | Toastr.options.positionClass = Config.controllername === 'index' ? "toast-top-right-index" : "toast-top-right"; | 6785 | Toastr.options.positionClass = Config.controllername === 'index' ? "toast-top-right-index" : "toast-top-right"; |
6780 | //点击包含.btn-dialog的元素时弹出dialog | 6786 | //点击包含.btn-dialog的元素时弹出dialog |
@@ -2063,7 +2063,6 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2063,7 +2063,6 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2063 | area: area, | 2063 | area: area, |
2064 | content: url, | 2064 | content: url, |
2065 | zIndex: Layer.zIndex, | 2065 | zIndex: Layer.zIndex, |
2066 | - skin: 'layui-layer-noborder', | ||
2067 | success: function (layero, index) { | 2066 | success: function (layero, index) { |
2068 | var that = this; | 2067 | var that = this; |
2069 | //存储callback事件 | 2068 | //存储callback事件 |
@@ -2096,9 +2095,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2096,9 +2095,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2096 | } | 2095 | } |
2097 | } | 2096 | } |
2098 | }, options ? options : {}); | 2097 | }, options ? options : {}); |
2099 | - if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0) { | 2098 | + if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0)) { |
2100 | options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"]; | 2099 | options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"]; |
2101 | - options.offset = [ top.$(".tab-pane.active").scrollTop() + "px", "0px"]; | 2100 | + options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"]; |
2102 | } | 2101 | } |
2103 | Layer.open(options); | 2102 | Layer.open(options); |
2104 | return false; | 2103 | return false; |
@@ -2142,7 +2141,7 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2142,7 +2141,7 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2142 | if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { | 2141 | if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { |
2143 | var titHeight = layero.find('.layui-layer-title').outerHeight() || 0; | 2142 | var titHeight = layero.find('.layui-layer-title').outerHeight() || 0; |
2144 | var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; | 2143 | var btnHeight = layero.find('.layui-layer-btn').outerHeight() || 0; |
2145 | - $("iframe", layero).parent().addClass("ios-iframe-fix").css("height", layero.height() - titHeight - btnHeight); | 2144 | + $("iframe", layero).parent().css("height", layero.height() - titHeight - btnHeight); |
2146 | $("iframe", layero).css("height", "100%"); | 2145 | $("iframe", layero).css("height", "100%"); |
2147 | } | 2146 | } |
2148 | }, | 2147 | }, |
@@ -2219,6 +2218,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | @@ -2219,6 +2218,9 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u | ||
2219 | setting.url = Fast.api.fixurl(setting.url); | 2218 | setting.url = Fast.api.fixurl(setting.url); |
2220 | } | 2219 | } |
2221 | }); | 2220 | }); |
2221 | + Layer.config({ | ||
2222 | + skin: 'layui-layer-fast' | ||
2223 | + }); | ||
2222 | // 绑定ESC关闭窗口事件 | 2224 | // 绑定ESC关闭窗口事件 |
2223 | $(window).keyup(function (e) { | 2225 | $(window).keyup(function (e) { |
2224 | if (e.keyCode == 27) { | 2226 | if (e.keyCode == 27) { |
@@ -70,7 +70,12 @@ body.is-dialog { | @@ -70,7 +70,12 @@ body.is-dialog { | ||
70 | /*width: 70%;*/ | 70 | /*width: 70%;*/ |
71 | max-width:885px; | 71 | max-width:885px; |
72 | } | 72 | } |
73 | - | 73 | +/*iOS兼容*/ |
74 | +html.ios-fix,html.ios-fix body { | ||
75 | + height: 100%; | ||
76 | + overflow: auto; | ||
77 | + -webkit-overflow-scrolling: touch; | ||
78 | +} | ||
74 | .content { | 79 | .content { |
75 | min-height:500px; | 80 | min-height:500px; |
76 | } | 81 | } |
@@ -90,18 +95,8 @@ body.is-dialog { | @@ -90,18 +95,8 @@ body.is-dialog { | ||
90 | height: 100%; | 95 | height: 100%; |
91 | width: 100%; | 96 | width: 100%; |
92 | } | 97 | } |
93 | - &.ios-iframe-fix{ | ||
94 | - .tab-pane { | ||
95 | - -webkit-overflow-scrolling:touch; | ||
96 | - overflow: auto; | ||
97 | - } | ||
98 | - } | ||
99 | -} | ||
100 | -.layui-layer-iframe .layui-layer-content.ios-iframe-fix { | ||
101 | - -webkit-overflow-scrolling: touch; | ||
102 | - overflow: auto; | ||
103 | - overflow-y: auto!important; | ||
104 | } | 98 | } |
99 | + | ||
105 | @media only screen and (min-width : 481px) { | 100 | @media only screen and (min-width : 481px) { |
106 | .row-flex { | 101 | .row-flex { |
107 | display: flex; | 102 | display: flex; |
@@ -603,104 +598,110 @@ table.table-template{ | @@ -603,104 +598,110 @@ table.table-template{ | ||
603 | .box-shadow(0 0 3px #eee); | 598 | .box-shadow(0 0 3px #eee); |
604 | } | 599 | } |
605 | } | 600 | } |
606 | - | ||
607 | -.layui-layer-title { | ||
608 | - background:#2c3e50!important; | ||
609 | - color:#fff!important; | ||
610 | -} | ||
611 | - | ||
612 | -/*避免出现多滚动条*/ | ||
613 | -.layui-layer-noborder { | ||
614 | - border:none!important; | ||
615 | - box-shadow: 1px 1px 50px rgba(0,0,0,.3)!important; | ||
616 | -} | ||
617 | -.layui-layer-moves{ | ||
618 | - .box-sizing(content-box); | ||
619 | -} | ||
620 | -.layui-layer-iframe { | ||
621 | - overflow:hidden!important; | ||
622 | -} | ||
623 | -.layui-layer-iframe .layui-layer-content { | ||
624 | - -webkit-overflow-scrolling: touch; | ||
625 | - overflow-y: hidden!important; | ||
626 | - overflow:hidden; | ||
627 | -} | ||
628 | -/*自定义底部灰色操作区*/ | ||
629 | -.layui-layer-btn { | ||
630 | - text-align: center!important; | ||
631 | - padding: 10px!important; | ||
632 | - background: #ecf0f1; | ||
633 | -} | ||
634 | -.layui-layer-footer { | ||
635 | - padding:8px 20px; | ||
636 | - background-color:#ecf0f1; | ||
637 | - height:auto; | ||
638 | - text-align:inherit!important; | ||
639 | -} | ||
640 | - | ||
641 | -.layui-layer-btn a { | ||
642 | - background-color: #95a5a6!important; | ||
643 | - border-color: #95a5a6!important; | ||
644 | - color:#fff!important; | ||
645 | -} | ||
646 | - | ||
647 | -.layui-layer-btn .layui-layer-btn0{ | ||
648 | - background-color: #18bc9c!important; | ||
649 | - border-color: #18bc9c!important; | ||
650 | -} | ||
651 | - | ||
652 | -.layui-layer-setwin { | ||
653 | - top:10px!important; | ||
654 | - > a { | ||
655 | - background:none!important; | ||
656 | - cite { | ||
657 | - display:none; | ||
658 | - } | ||
659 | - &:after { | ||
660 | - content: "\e625"; | ||
661 | - font-family: iconfont; | ||
662 | - font-style: normal; | ||
663 | - font-weight: normal; | ||
664 | - text-decoration: inherit; | ||
665 | - position: absolute; | ||
666 | - font-size: 18px; | ||
667 | - color: #fff; | ||
668 | - margin: 0; | ||
669 | - z-index: 1; | 601 | +.layui-layer-fast { |
602 | + | ||
603 | + .layui-layer-title { | ||
604 | + background:#2c3e50!important; | ||
605 | + color:#fff!important; | ||
606 | + border-bottom:none; | ||
607 | + //只有当包含layui-layer-title标题时才显示按钮 | ||
608 | + ~.layui-layer-setwin{ | ||
609 | + top: 0px; | ||
610 | + height:42px; | ||
611 | + > a{ | ||
612 | + height:42px; | ||
613 | + line-height:42px; | ||
614 | + display:inline-block; | ||
615 | + } | ||
670 | } | 616 | } |
671 | - &:hover { | ||
672 | - text-decoration: none!important; | ||
673 | - background:none!important; | 617 | + } |
618 | + | ||
619 | + &.layui-layer-border { | ||
620 | + border:none!important; | ||
621 | + box-shadow: 1px 1px 50px rgba(0,0,0,.3)!important; | ||
622 | + } | ||
623 | + .layui-layer-moves{ | ||
624 | + .box-sizing(content-box); | ||
625 | + } | ||
626 | + /*自定义底部灰色操作区*/ | ||
627 | + .layui-layer-btn { | ||
628 | + text-align: center!important; | ||
629 | + padding: 10px!important; | ||
630 | + background: #ecf0f1; | ||
631 | + a { | ||
632 | + background-color: #95a5a6!important; | ||
633 | + border-color: #95a5a6!important; | ||
634 | + color:#fff!important; | ||
674 | } | 635 | } |
675 | - &:focus { | ||
676 | - text-decoration: none!important; | 636 | + .layui-layer-btn0{ |
637 | + background-color: #18bc9c!important; | ||
638 | + border-color: #18bc9c!important; | ||
677 | } | 639 | } |
678 | } | 640 | } |
679 | - .layui-layer-min{ | ||
680 | - &:after { | ||
681 | - content: "\e625"; | ||
682 | - } | 641 | + .layui-layer-footer { |
642 | + padding:8px 20px; | ||
643 | + background-color:#ecf0f1; | ||
644 | + height:auto; | ||
645 | + text-align:inherit!important; | ||
683 | } | 646 | } |
684 | - .layui-layer-max{ | ||
685 | - &:after { | ||
686 | - content: "\e623"; | ||
687 | - } | ||
688 | 647 | ||
689 | - } | ||
690 | - .layui-layer-maxmin{ | ||
691 | - &:after { | ||
692 | - content: "\e624"; | 648 | + .layui-layer-setwin { |
649 | + > a { | ||
650 | + background:none!important; | ||
651 | + cite { | ||
652 | + display:none; | ||
653 | + } | ||
654 | + &:after { | ||
655 | + content: "\e625"; | ||
656 | + font-family: iconfont; | ||
657 | + font-style: normal; | ||
658 | + font-weight: normal; | ||
659 | + text-decoration: inherit; | ||
660 | + position: absolute; | ||
661 | + font-size: 18px; | ||
662 | + color: #fff; | ||
663 | + margin: 0; | ||
664 | + z-index: 1; | ||
665 | + } | ||
666 | + &:hover { | ||
667 | + text-decoration: none!important; | ||
668 | + background:none!important; | ||
669 | + } | ||
670 | + &:focus { | ||
671 | + text-decoration: none!important; | ||
672 | + } | ||
693 | } | 673 | } |
694 | - } | ||
695 | - .layui-layer-close1{ | ||
696 | - &:after { | ||
697 | - content: "\e626"; | 674 | + .layui-layer-min{ |
675 | + display:none; | ||
676 | + &:after { | ||
677 | + content: "\e625"; | ||
678 | + } | ||
698 | } | 679 | } |
699 | - } | ||
700 | - .layui-layer-close2,.layui-layer-close2:hover{ | ||
701 | - background:url('../libs/layer/build/skin/default/icon.png') no-repeat -149px -31px !important; | ||
702 | - &:after { | 680 | + .layui-layer-max{ |
703 | display:none; | 681 | display:none; |
682 | + &:after { | ||
683 | + content: "\e623"; | ||
684 | + } | ||
685 | + } | ||
686 | + .layui-layer-maxmin{ | ||
687 | + display:none; | ||
688 | + &:after { | ||
689 | + content: "\e624"; | ||
690 | + } | ||
691 | + } | ||
692 | + .layui-layer-close1{ | ||
693 | + &:after { | ||
694 | + content: "\e626"; | ||
695 | + } | ||
696 | + } | ||
697 | + //样式二关闭按钮 | ||
698 | + .layui-layer-close2,.layui-layer-close2:hover{ | ||
699 | + background:url('../libs/layer/build/skin/default/icon.png') no-repeat -149px -31px !important; | ||
700 | + top:-30px; | ||
701 | + right:-30px; | ||
702 | + &:after { | ||
703 | + display:none; | ||
704 | + } | ||
704 | } | 705 | } |
705 | } | 706 | } |
706 | } | 707 | } |
-
请 注册 或 登录 后发表评论