Merge pull request #1174 from sunxiaobin89/main

修复一些小问题
pull/1175/head
贤心 2022-12-06 16:41:58 +08:00 committed by GitHub
commit a78bb40532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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({

View File

@ -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){