mirror of https://github.com/layui/layui
				
				
				
			Merge branch '2.x' of github.com:layui/layui into 2.x
						commit
						b3fd6fb45c
					
				| 
						 | 
				
			
			@ -1500,7 +1500,7 @@
 | 
			
		|||
    if(options.range && options.type !== 'time'){
 | 
			
		||||
      start = start || (that.rangeLinked ? that.startDate : options.dateTime);
 | 
			
		||||
      end = end || that.endDate;
 | 
			
		||||
      isOut = that.newDate(start).getTime() > that.newDate(end).getTime();
 | 
			
		||||
      isOut = !that.endState || that.newDate(start).getTime() > that.newDate(end).getTime();
 | 
			
		||||
 | 
			
		||||
      //如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期
 | 
			
		||||
      (that.limit({
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,8 @@ layui.define('jquery', function(exports){
 | 
			
		|||
 | 
			
		||||
    return {
 | 
			
		||||
      setValue: function(value, index){ // 设置值
 | 
			
		||||
        value = value > options.max ? options.max : value;
 | 
			
		||||
        value = value < options.min ? options.min : value;
 | 
			
		||||
        options.value = value;
 | 
			
		||||
        return that.slide('set', value, index || 0);
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			@ -235,6 +237,7 @@ layui.define('jquery', function(exports){
 | 
			
		|||
        offsetValue = Math.round(offsetValue) * step
 | 
			
		||||
      };
 | 
			
		||||
      offsetValue = offsetValue > 100 ? 100: offsetValue;
 | 
			
		||||
      offsetValue = offsetValue < 0 ? 0: offsetValue;
 | 
			
		||||
      sliderWrap.eq(index).css((options.type === 'vertical' ?'bottom':'left'), offsetValue + '%');
 | 
			
		||||
      var firLeft = valueTo(sliderWrap[0].offsetLeft)
 | 
			
		||||
      ,secLeft = options.range ? valueTo(sliderWrap[1].offsetLeft) : 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -298,7 +301,7 @@ layui.define('jquery', function(exports){
 | 
			
		|||
    };
 | 
			
		||||
    
 | 
			
		||||
    //动态赋值
 | 
			
		||||
    if(setValue === 'set') return change(value, i, 'done');
 | 
			
		||||
    if(setValue === 'set') return change(value - options.min, i, 'done');
 | 
			
		||||
 | 
			
		||||
    //滑块滑动
 | 
			
		||||
    sliderAct.find('.' + SLIDER_WRAP_BTN).each(function(index){
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue