This commit is contained in:
sentsin
2016-10-15 10:37:24 +08:00
parent 9aca6f02f4
commit eefa3a5ae3
30 changed files with 91 additions and 86 deletions

View File

@@ -118,7 +118,7 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-btn-mini i{font-size: 14px !important;}
/** 表单 **/
.layui-input, .layui-textarea{display: block; width: 100%; padding: 0 10px; height: 38px; line-height: 36px\9; border: 1px solid #e6e6e6; background-color: #fff; border-radius: 2px;}
.layui-input, .layui-textarea{display: block; width: 100%; padding: 0 10px; height: 38px; line-height: 20px; line-height: 36px\9; border: 1px solid #e6e6e6; background-color: #fff; border-radius: 2px;}
.layui-input:hover, .layui-textarea:hover{border-color: #D2D2D2 !important;}
.layui-input:focus, .layui-textarea:focus{border-color: #C9C9C9 !important;}
.layui-textarea{position: relative; min-height: 100px; height: auto; line-height: 20px; padding: 6px 10px; resize: vertical;}

View File

@@ -402,6 +402,7 @@ layui.define(['layer', 'form'], function(exports){
//触发内容区域
body.on('click', function(){
toolCheck.call(iframeWin, tools);
layer.close(face.index);
});
}

View File

@@ -13,7 +13,7 @@
"use strict";
var Lay = function(){
this.v = '1.0.0'; //版本号
this.v = '1.0.1'; //版本号
};
Lay.fn = Lay.prototype;
@@ -296,18 +296,28 @@ Lay.fn.router = function(hash){
//本地存储
Lay.fn.data = function(table, settings){
table = table || 'layui';
if(!win.JSON || !win.JSON.parse) return;
//如果settings为null则删除表
if(settings === null){
return delete localStorage[table];
}
settings = typeof settings === 'object'
? settings
: {key: settings};
if(!win.JSON || !win.JSON.parse) return;
try{
var data = JSON.parse(localStorage[table]);
} catch(e){
var data = {};
}
if(settings.value) data[settings.key] = settings.value;
if(settings.remove) delete data[settings.key];
localStorage[table] = JSON.stringify(data);
return settings.key ? data[settings.key] : data;
};