1
This commit is contained in:
parent
4f40e560bb
commit
5e10d720e6
1
dist/css/layui.css
vendored
Normal file
1
dist/css/layui.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/css/modules/code.css
vendored
Normal file
1
dist/css/modules/code.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-view{display:block;position:relative;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#fafafa;color:#333;font-family:Courier New;font-size:13px}.layui-code-h3{position:relative;padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee;font-size:12px}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0c0c0c;border-left-color:#3f3f3f;background-color:#0c0c0c;color:#c2be9e}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3f3f3f;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none}
|
1
dist/css/modules/laydate/default/laydate.css
vendored
Normal file
1
dist/css/modules/laydate/default/laydate.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dist/css/modules/layer/default/icon-ext.png
vendored
Normal file
BIN
dist/css/modules/layer/default/icon-ext.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
BIN
dist/css/modules/layer/default/icon.png
vendored
Normal file
BIN
dist/css/modules/layer/default/icon.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
1
dist/css/modules/layer/default/layer.css
vendored
Normal file
1
dist/css/modules/layer/default/layer.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dist/css/modules/layer/default/loading-0.gif
vendored
Normal file
BIN
dist/css/modules/layer/default/loading-0.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
BIN
dist/css/modules/layer/default/loading-1.gif
vendored
Normal file
BIN
dist/css/modules/layer/default/loading-1.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 701 B |
BIN
dist/css/modules/layer/default/loading-2.gif
vendored
Normal file
BIN
dist/css/modules/layer/default/loading-2.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
dist/font/iconfont.eot
vendored
Normal file
BIN
dist/font/iconfont.eot
vendored
Normal file
Binary file not shown.
554
dist/font/iconfont.svg
vendored
Normal file
554
dist/font/iconfont.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 299 KiB |
BIN
dist/font/iconfont.ttf
vendored
Normal file
BIN
dist/font/iconfont.ttf
vendored
Normal file
Binary file not shown.
BIN
dist/font/iconfont.woff
vendored
Normal file
BIN
dist/font/iconfont.woff
vendored
Normal file
Binary file not shown.
BIN
dist/font/iconfont.woff2
vendored
Normal file
BIN
dist/font/iconfont.woff2
vendored
Normal file
Binary file not shown.
@ -450,7 +450,12 @@ layui.define('layer', function(exports){
|
||||
hideDown(true);
|
||||
return false;
|
||||
});
|
||||
|
||||
dds.on('mousedown',(events)=>{
|
||||
events.stopPropagation()
|
||||
});
|
||||
dds.on('mouseup',(events)=>{
|
||||
events.stopPropagation()
|
||||
});
|
||||
reElem.find('dl>dt').on('click', function(e){
|
||||
return false;
|
||||
});
|
||||
|
@ -30,9 +30,9 @@ layui.define('jquery', function(exports){
|
||||
,options = that.config;
|
||||
|
||||
return {
|
||||
setValue: function(value, index){ //设置值
|
||||
setValue: function(value, index,s){ //设置值
|
||||
options.value = value;
|
||||
return that.slide('set', value, index || 0);
|
||||
return that.slide('set', value, index || 0,s);
|
||||
}
|
||||
,config: options
|
||||
}
|
||||
@ -47,6 +47,7 @@ layui.define('jquery', function(exports){
|
||||
that.index = ++slider.index;
|
||||
that.config = $.extend({}, that.config, slider.config, options);
|
||||
that.render();
|
||||
that.anxia = false;
|
||||
};
|
||||
|
||||
//默认配置
|
||||
@ -206,7 +207,7 @@ layui.define('jquery', function(exports){
|
||||
};
|
||||
|
||||
//滑块滑动
|
||||
Class.prototype.slide = function(setValue, value, i){
|
||||
Class.prototype.slide = function(setValue, value, i,s){
|
||||
var that = this
|
||||
,options = that.config
|
||||
,sliderAct = that.elemTemp
|
||||
@ -217,7 +218,7 @@ layui.define('jquery', function(exports){
|
||||
,sliderTxt = sliderAct.next('.' + SLIDER_INPUT)
|
||||
,inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val()
|
||||
,step = 100 / ((options.max - options.min) / Math.ceil(options.step))
|
||||
,change = function(offsetValue, index){
|
||||
,change = function(offsetValue, index,s){
|
||||
if(Math.ceil(offsetValue) * step > 100){
|
||||
offsetValue = Math.ceil(offsetValue) * step
|
||||
}else{
|
||||
@ -259,7 +260,7 @@ layui.define('jquery', function(exports){
|
||||
}
|
||||
|
||||
//回调
|
||||
options.change && options.change(options.range ? arrValue : selfValue);
|
||||
options.change && options.change(options.range ? arrValue : selfValue,selfValue,s);
|
||||
}
|
||||
,valueTo = function(value){
|
||||
var oldLeft = value / sliderWidth() * 100 / step
|
||||
@ -283,7 +284,7 @@ layui.define('jquery', function(exports){
|
||||
};
|
||||
|
||||
//动态赋值
|
||||
if(setValue === 'set') return change(value, i);
|
||||
if(setValue === 'set') return change(value, i,s);
|
||||
|
||||
//滑块滑动
|
||||
sliderAct.find('.' + SLIDER_WRAP_BTN).each(function(index){
|
||||
@ -304,7 +305,7 @@ layui.define('jquery', function(exports){
|
||||
if(left < 0)left = 0;
|
||||
if(left > sliderWidth())left = sliderWidth();
|
||||
var reaLeft = left / sliderWidth() * 100 / step;
|
||||
change(reaLeft, index);
|
||||
change(reaLeft, index,2);
|
||||
othis.addClass(ELEM_HOVER);
|
||||
sliderAct.find('.' + SLIDER_TIPS).show();
|
||||
e.preventDefault();
|
||||
@ -336,11 +337,46 @@ layui.define('jquery', function(exports){
|
||||
}else{
|
||||
index = 0;
|
||||
};
|
||||
change(reaLeft, index);
|
||||
// console.log(reaLeft,left,step)
|
||||
change(reaLeft, index,true);
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// 拖动滑块
|
||||
sliderAct.find('.' + SLIDER_BAR).on("mousemove",function (e){
|
||||
if(!that.anxia){
|
||||
return
|
||||
}
|
||||
return
|
||||
var main = $('.' + SLIDER_WRAP_BTN);
|
||||
if(!main.is(event.target) && main.has(event.target).length === 0 && main.length){
|
||||
var left = options.type === 'vertical' ? (sliderWidth() - e.clientY + $(this).offset().top):(e.clientX - $(this).offset().left), index;
|
||||
if(left < 0)left = 0;
|
||||
if(left > sliderWidth())left = sliderWidth();
|
||||
var reaLeft = left / sliderWidth() * 100 / step;
|
||||
if(options.range){
|
||||
if(options.type === 'vertical'){
|
||||
index = Math.abs(left - parseInt($(sliderWrap[0]).css('bottom'))) > Math.abs(left - parseInt($(sliderWrap[1]).css('bottom'))) ? 1 : 0;
|
||||
}else{
|
||||
index = Math.abs(left - sliderWrap[0].offsetLeft) > Math.abs(left - sliderWrap[1].offsetLeft) ? 1 : 0;
|
||||
}
|
||||
}else{
|
||||
index = 0;
|
||||
};
|
||||
console.log(reaLeft,left,step)
|
||||
change(reaLeft, index);
|
||||
e.preventDefault();
|
||||
}
|
||||
})
|
||||
sliderAct.find('.' + SLIDER_BAR).on("mousedown",function (){
|
||||
that.anxia = true
|
||||
})
|
||||
sliderAct.find('.' + SLIDER_BAR).on("mouseup",function (){
|
||||
that.anxia = false
|
||||
})
|
||||
sliderAct.find('.' + SLIDER_BAR).on("click",function (e){
|
||||
e.preventDefault();
|
||||
})
|
||||
//点击加减输入框
|
||||
sliderTxt.children('.' + SLIDER_INPUT_BTN).children('i').each(function(index){
|
||||
$(this).on('click', function(){
|
||||
|
Loading…
Reference in New Issue
Block a user