diff --git a/examples/slider.html b/examples/slider.html index 31051709..2c5a9571 100644 --- a/examples/slider.html +++ b/examples/slider.html @@ -16,6 +16,8 @@ body{padding:100px 0;}
+
+
@@ -50,6 +52,12 @@ layui.use('slider', function(){ }); sliderInst.setValue(30); + + + slider.render({ + elem: '#slideTest2', + type: 'vertical' + }); }); diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index 0cccc385..9bf76a8b 100644 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -495,7 +495,7 @@ layui.define(['jquery', 'laytpl', 'lay'], function(exports){ //是否超出底部屏幕 if(rect.bottom > _WIN.height()){ - elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height())); + elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height() + 5)); }; }).on('mouseleave', ELEM_LI_PAR, function(e){ var othis = $(this) diff --git a/src/modules/layer.js b/src/modules/layer.js index edcee5b0..8e59e25e 100644 --- a/src/modules/layer.js +++ b/src/modules/layer.js @@ -850,7 +850,7 @@ layer.style = function(index, options, limit){ } layero.css(options); - btnHeight = layero.find('.'+doms[6]).outerHeight(); + btnHeight = layero.find('.'+doms[6]).outerHeight() || 0; if(type === ready.type[2]){ layero.find('iframe').css({