QSMP.Web/Content/layui/lay/modules/layer.js
(开头部分) 39KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
@Name:layer v3.1.2 Web弹层组件
@Author:贤心
@Site:http://layer.layui.com
@License:MIT
*/
;!function(window, undefined){
"use strict";
var isLayui = window.layui && layui.define, $, win, ready = {
getPath: function(){
var jsPath = document.currentScript ? document.currentScript.src : function(){
var js = document.scripts
,last = js.length - 1
,src;
for(var i = last; i > 0; i--){
if(js[i].readyState === 'interactive'){
src = js[i].src;
break;
}
}
return src || js[last].src;
}();
return jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
}(),
config: {}, end: {}, minIndex: 0, minLeft: [],
btn: ['确定', '取消'],
//五种原始层模式
type: ['dialog', 'page', 'iframe', 'loading', 'tips'],
//获取节点的style属性值
getStyle: function(node, name){
var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
},
//载入CSS配件
link: function(href, fn, cssname){
//未设置路径,则不主动加载css
if(!layer.path) return;
var head = document.getElementsByTagName("head")[0], link = document.createElement('link');
if(typeof fn === 'string') cssname = fn;
var app = (cssname || href).replace(/\.|\//g, '');
var id = 'layuicss-'+ app, timeout = 0;
link.rel = 'stylesheet';
link.href = layer.path + href;
link.id = id;
if(!document.getElementById(id)){
head.appendChild(link);
}
后面还有 1244 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
