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