Merge branch '2.x' of github.com:layui/layui into 2.x

pull/1321/head
贤心 1 year ago
commit ac6d0ddb76

@ -294,7 +294,7 @@ layui.define(['lay', 'util', 'element', 'form'], function(exports){
// header // header
var headerElem = $('<div class="'+ CONST.ELEM_TITLE +'">'); var headerElem = $('<div class="'+ CONST.ELEM_TITLE +'">');
// 添加组件 clasName // 添加组件 className
othis.addClass('layui-code-view layui-box'); othis.addClass('layui-code-view layui-box');
// 自定义风格 // 自定义风格

@ -214,7 +214,7 @@ layui.define(['jquery', 'lay'], function(exports){
,'</div>'].join('')) ,'</div>'].join(''))
//初始化颜色选择框 //初始化颜色选择框
var elem = options.elem = $(options.elem); elem = options.elem = $(options.elem);
options.size && elemColorBox.addClass('layui-colorpicker-'+ options.size); //初始化颜色选择框尺寸 options.size && elemColorBox.addClass('layui-colorpicker-'+ options.size); //初始化颜色选择框尺寸
// 插入颜色选择框 // 插入颜色选择框

@ -61,7 +61,7 @@ layui.define('jquery', function(exports){
//如果允许图片懒加载 //如果允许图片懒加载
if(options.isLazyimg){ if(options.isLazyimg){
var lazyimg = that.lazyimg({ lazyimg = that.lazyimg({
elem: options.elem + ' img' elem: options.elem + ' img'
,scrollElem: options.scrollElem ,scrollElem: options.scrollElem
}); });

@ -1128,9 +1128,9 @@
//日历表 //日历表
Class.prototype.calendar = function(value, index, type){ Class.prototype.calendar = function(value, index, type){
index = index ? 1 : 0;
var that = this var that = this
,options = that.config ,options = that.config
,index = index ? 1 : 0
,dateTime = value || that.thisDateTime(index) ,dateTime = value || that.thisDateTime(index)
,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate ,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate
,lang = that.lang() ,lang = that.lang()
@ -1156,7 +1156,7 @@
//赋值日 //赋值日
lay.each(tds, function(index_, item){ lay.each(tds, function(index_, item){
var YMD = [dateTime.year, dateTime.month], st = 0; var YMD = [dateTime.year, dateTime.month], st;
item = lay(item); item = lay(item);
item.removeAttr("class"); item.removeAttr("class");
if(index_ < startWeek){ if(index_ < startWeek){
@ -1971,7 +1971,7 @@
,elemCont = that.elemCont[index || 0] ,elemCont = that.elemCont[index || 0]
,listYM = that.listYM[index] ,listYM = that.listYM[index]
,addSubYeay = function(type){ ,addSubYear = function(type){
var isYear = lay(elemCont).find('.laydate-year-list')[0] var isYear = lay(elemCont).find('.laydate-year-list')[0]
,isMonth = lay(elemCont).find('.laydate-month-list')[0]; ,isMonth = lay(elemCont).find('.laydate-month-list')[0];
@ -2006,7 +2006,7 @@
return { return {
prevYear: function(){ prevYear: function(){
if(addSubYeay('sub')) return; if(addSubYear('sub')) return;
if (that.rangeLinked) { if (that.rangeLinked) {
options.dateTime.year--; options.dateTime.year--;
that.checkDate('limit').calendar(null, null, 'init'); that.checkDate('limit').calendar(null, null, 'init');
@ -2048,7 +2048,7 @@
} }
} }
,nextYear: function(){ ,nextYear: function(){
if(addSubYeay()) return; if(addSubYear()) return;
if (that.rangeLinked) { if (that.rangeLinked) {
options.dateTime.year++; options.dateTime.year++;
that.checkDate('limit').calendar(null, 0, 'init'); that.checkDate('limit').calendar(null, 0, 'init');

Loading…
Cancel
Save