解决IE浏览器的问题
parent
a0529c2acf
commit
8876b8b8ba
|
|
@ -560,12 +560,12 @@ layui.define(function (exports) {
|
|||
];
|
||||
|
||||
exports('echartsData', {
|
||||
mapTree,
|
||||
mapCircle,
|
||||
mapChina3,
|
||||
mapChina2,
|
||||
mapChina,
|
||||
Address
|
||||
mapTree:mapTree,
|
||||
mapCircle:mapCircle,
|
||||
mapChina3:mapChina3,
|
||||
mapChina2:mapChina2,
|
||||
mapChina:mapChina,
|
||||
Address:Address
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -317,9 +317,9 @@ layui.define(function (exports) {
|
|||
};
|
||||
|
||||
exports('mapTest', {
|
||||
option_a,
|
||||
option_b,
|
||||
option_c,
|
||||
option_d
|
||||
option_a:option_a,
|
||||
option_b:option_b,
|
||||
option_c:option_c,
|
||||
option_d:option_d
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ layui.use(['element', 'layer', 'okUtils', 'okTab'], function () {
|
|||
});
|
||||
$("body").on("click", "#fullScreen", function () {
|
||||
if ($(this).children("i").hasClass("okicon-screen-restore")) {
|
||||
screenFun(2).then(() => {
|
||||
screenFun(2).then(function(){
|
||||
$(this).children("i").eq(0).removeClass("okicon-screen-restore");
|
||||
});
|
||||
} else {
|
||||
screenFun(1).then(() => {
|
||||
screenFun(1).then(function(){
|
||||
$(this).children("i").eq(0).addClass("okicon-screen-restore");
|
||||
});
|
||||
}
|
||||
|
|
@ -90,7 +90,8 @@ layui.use(['element', 'layer', 'okUtils', 'okTab'], function () {
|
|||
* num为1代表全屏
|
||||
* num为2代表退出全屏
|
||||
*/
|
||||
function screenFun(num = 1) {
|
||||
function screenFun(num) {
|
||||
num = num || 1;
|
||||
num = num * 1;
|
||||
var docElm = document.documentElement;
|
||||
|
||||
|
|
@ -119,7 +120,7 @@ layui.use(['element', 'layer', 'okUtils', 'okTab'], function () {
|
|||
break;
|
||||
}
|
||||
|
||||
return new Promise((res, rej) => {
|
||||
return new Promise(function(res, rej){
|
||||
res("返回值");
|
||||
});
|
||||
}
|
||||
|
|
@ -145,7 +146,7 @@ layui.use(['element', 'layer', 'okUtils', 'okTab'], function () {
|
|||
content: "ok-admin v2.0上线啦(^し^)<br />" +
|
||||
"在此郑重承诺该模板<span style='color:#5cb85c'>永久免费</span>为大家提供" +
|
||||
"<br />若有更好的建议欢迎<span id='noticeQQ'>加入QQ群</span>一起聊",
|
||||
yes: (index) => {
|
||||
yes: function(index){
|
||||
if (srcWidth > 800) {
|
||||
layer.tips('公告跑到这里去啦', '#notice', {
|
||||
tips: [1, '#000'],
|
||||
|
|
@ -155,7 +156,7 @@ layui.use(['element', 'layer', 'okUtils', 'okTab'], function () {
|
|||
sessionStorage.setItem("notice", "true");
|
||||
layer.close(index);
|
||||
},
|
||||
cancel: (index) => {
|
||||
cancel: function(index){
|
||||
if (srcWidth > 800) {
|
||||
layer.tips('公告跑到这里去啦', '#notice', {
|
||||
tips: [1, '#000'],
|
||||
|
|
|
|||
|
|
@ -39,15 +39,20 @@ layui.define(['jquery'], function (exports) {
|
|||
argums.target = $(argums.target)[0];
|
||||
argums.endVal = argums.endVal || $($(argums.target)[0]).text();
|
||||
|
||||
var {
|
||||
/*var {
|
||||
target,
|
||||
startVal,
|
||||
endVal,
|
||||
decimals,
|
||||
duration,
|
||||
options
|
||||
} = argums;// 这里是ES6语法
|
||||
|
||||
} = argums;// 这里是ES6语法*/
|
||||
var target = argums.target,
|
||||
startVal = target.startVal,
|
||||
endVal = target.endVal,
|
||||
decimals = target.decimals,
|
||||
duration = target.duration,
|
||||
options = target.options;
|
||||
var self = this;
|
||||
self.version = function () {
|
||||
return "1.9.2"
|
||||
|
|
|
|||
|
|
@ -115,7 +115,9 @@ layui.define(["element", "jquery"], function (exports) {
|
|||
okTab.prototype.tab = function () {
|
||||
var that = this;
|
||||
var filter = this.tabConfig.tabFilter;
|
||||
element.on(`tab(${filter})`, function (data) {
|
||||
// "hello {0}".format("world");
|
||||
//`tab(${filter})`
|
||||
element.on("tab({0})".format(filter), function (data) {
|
||||
var index = data.index;//点击的某个tab索引
|
||||
var elSuper = $(".ok-tab"),//视窗元素
|
||||
elMove = $(".ok-tab-title"),//移动的元素
|
||||
|
|
@ -129,7 +131,8 @@ layui.define(["element", "jquery"], function (exports) {
|
|||
okTab.prototype.tabDelete = function () {
|
||||
var that = this;
|
||||
var filter = this.tabConfig.tabFilter;
|
||||
element.on(`tabDelete(${filter})`, function (data) {
|
||||
//`tabDelete(${filter})`
|
||||
element.on("tabDelete({0})".format(filter), function (data) {
|
||||
// that.navMove("right");
|
||||
});
|
||||
};
|
||||
|
|
@ -184,12 +187,13 @@ layui.define(["element", "jquery"], function (exports) {
|
|||
layer.msg('最多只能同时打开' + openTabNum + '个选项卡哦。不然系统会卡的!');
|
||||
return;
|
||||
}
|
||||
var contentIframe = ("<iframe src='{0}' lay-id='{1}'"+
|
||||
"frameborder='0' scrolling='yes' width='100%' height='100%'>"+
|
||||
"</iframe>").format(url,tabId);
|
||||
element.tabAdd(tabFilter, {
|
||||
title: html
|
||||
, content: `
|
||||
<iframe src='${url}' lay-id='${tabId}' frameborder="0" scrolling="yes" width="100%" height="100%"></iframe>
|
||||
`
|
||||
, id: tabId
|
||||
title: html,
|
||||
content: contentIframe,
|
||||
id: tabId
|
||||
});
|
||||
|
||||
// 切换选项卡
|
||||
|
|
@ -320,7 +324,8 @@ layui.define(["element", "jquery"], function (exports) {
|
|||
* 2:代表关闭其他标签页
|
||||
* 3:代表关闭所有标签页
|
||||
*/
|
||||
okTab.prototype.tabClose = function (num = 1) {
|
||||
okTab.prototype.tabClose = function (num) {
|
||||
num = num || 1;
|
||||
num = num * 1;//强制转换成数字
|
||||
var that = this;
|
||||
let openTabs = $('.ok-tab-title > li strong[lay-id]').not('strong[is-close=false]'),//获取已打开的tab元素(除开不会被关闭的导航)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ layui.define(["jquery"], function (exprots) {
|
|||
getBodyWidth: function () {
|
||||
return document.body.scrollWidth;//body的总宽度
|
||||
},
|
||||
echartsResize(...elemnt) {
|
||||
echartsResize: function(elemnt) {
|
||||
/*
|
||||
* 主要用于对echart视图自动适应宽度
|
||||
* elemnt:可变参数
|
||||
|
|
@ -13,7 +13,8 @@ layui.define(["jquery"], function (exprots) {
|
|||
* var mapTree2 = echarts.init($("#mapOne")[0], "mytheme");
|
||||
* resize(mapTree,mapTree2);
|
||||
* */
|
||||
window.addEventListener("resize", () => {
|
||||
elemnt = elemnt || [];
|
||||
window.addEventListener("resize", function(){
|
||||
for (var i = 0; i < elemnt.length; i++) {
|
||||
elemnt[i].resize();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,29 @@
|
|||
/** layui-v2.5.4 MIT License By https://www.layui.com */
|
||||
;!function (e) {
|
||||
if (!Object.assign) {
|
||||
Object.defineProperty(Object, "assign", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: function(target, firstSource) {
|
||||
"use strict";
|
||||
if (target === undefined || target === null)
|
||||
throw new TypeError("Cannot convert first argument to object");
|
||||
var to = Object(target);
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var nextSource = arguments[i];
|
||||
if (nextSource === undefined || nextSource === null) continue;
|
||||
var keysArray = Object.keys(Object(nextSource));
|
||||
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
|
||||
var nextKey = keysArray[nextIndex];
|
||||
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
||||
if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey];
|
||||
}
|
||||
}
|
||||
return to;
|
||||
}
|
||||
});
|
||||
}
|
||||
!function (e) {
|
||||
"use strict";
|
||||
var okmodules = {
|
||||
"okTab": "okmodules/okTab",
|
||||
|
|
|
|||
Loading…
Reference in New Issue