This commit is contained in:
sentsin
2016-11-30 02:23:57 +08:00
parent 1e8bd1496c
commit c1663351cc
32 changed files with 141 additions and 122 deletions

View File

@@ -254,7 +254,7 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-table[lay-skin="nob"] th, .layui-table[lay-skin="nob"] td{border: none;}
/** 文件上传 **/
.layui-upload-button{position: relative; display: inline-block; vertical-align: middle; min-width: 60px; height: 36px; line-height: 36px; border: 1px solid #DFDFDF; border-radius: 2px; overflow: hidden; background-color: #fff; color: #666;}
.layui-upload-button{position: relative; display: inline-block; vertical-align: middle; min-width: 60px; height: 38px; line-height: 38px; border: 1px solid #DFDFDF; border-radius: 2px; overflow: hidden; background-color: #fff; color: #666;}
.layui-upload-button:hover{border: 1px solid #aaa; color: #333;}
.layui-upload-button:active{border: 1px solid #4CAF50; color: #000;}
.layui-upload-file,

View File

@@ -1,6 +1,6 @@
/**
/**
@Name用于打包打包PC完整版即包含layui.js和所有模块的完整合并该文件不会存在于构建后的目录
@Name用于打包PC完整版即包含layui.js和所有模块的完整合并该文件不会存在于构建后的目录
@Author贤心
@LicenseLGPL

View File

@@ -1,11 +0,0 @@
/**
@Name用于打包PC完整模块该文件不会存在于构建后的目录
@Author贤心
@LicenseLGPL
*/
layui.define(function(exports){
exports('layui.mod', layui.v);
});

View File

@@ -153,15 +153,16 @@ layui.define('jquery', function(exports){
,filter = parents.attr('lay-filter');
if(othis.find('.'+NAV_CHILD)[0]) return;
othis.addClass(THIS).siblings().removeClass(THIS);
parents.find('.'+THIS).removeClass(THIS);
othis.addClass(THIS);
layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);
}
//点击子菜单选中
,clickChild: function(){
var othis = $(this), parents = othis.parents(NAV_ELEM)
,filter = parents.attr('lay-filter');
othis.addClass(THIS).siblings().removeClass(THIS);
parents.find('.'+THIS).removeClass(THIS);
othis.addClass(THIS);
layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);
}
//展开二级菜单

View File

@@ -13,7 +13,7 @@
"use strict";
var Lay = function(){
this.v = '1.0.5'; //版本号
this.v = '1.0.6'; //版本号
};
Lay.fn = Lay.prototype;
@@ -91,6 +91,10 @@ Lay.fn.use = function(apps, callback, exports){
var head = doc.getElementsByTagName('head')[0];
apps = typeof apps === 'string' ? [apps] : apps;
if(!apps || apps.length === 0 || layui['layui.all']){
return typeof callback === 'function' && callback.apply(layui, exports), that;
}
//如果页面已经存在jQuery1.7+库且所定义的模块依赖jQuery则不加载内部jquery模块
if(window.jQuery && jQuery.fn.on){
@@ -107,10 +111,6 @@ Lay.fn.use = function(apps, callback, exports){
//静态资源host
config.host = config.host || (dir.match(/\/\/([\s\S]+?)\//)||['//'+ location.host +'/'])[0];
if(apps.length === 0){
return callback();
}
//加载完毕
function onScriptLoad(e, url){
@@ -177,12 +177,6 @@ Lay.fn.use = function(apps, callback, exports){
};
//使用打包好的完整Layui库
Lay.fn.all = function(callback){
this.use('layui.mod', callback)
return this;
};
//获取节点的style属性值
Lay.fn.getStyle = function(node, name){
var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);