新版
This commit is contained in:
@@ -8,19 +8,14 @@
|
||||
<link rel="stylesheet" href="../src/css/layui.css">
|
||||
|
||||
<style>
|
||||
body{padding:20px;}
|
||||
p{font-size: 18px; margin: 20px 0 50px;}
|
||||
body{padding:100px 0;}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="layui-container">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs8">
|
||||
<p>默认滑块</p>
|
||||
<div id="slideTest1"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="slideTest1"></div>
|
||||
</div>
|
||||
|
||||
<script src="../src/layui.js"></script>
|
||||
@@ -28,26 +23,27 @@ p{font-size: 18px; margin: 20px 0 50px;}
|
||||
|
||||
layui.use('slider', function(){
|
||||
var slider = layui.slider;
|
||||
|
||||
slider.render({
|
||||
elem: '#slideTest1'
|
||||
// ,min: 0 //最小值
|
||||
// ,max: 100 //最大值
|
||||
// ,value: 40 //初始值
|
||||
// ,step: 10 //间隔值
|
||||
// ,showstep: true //间隔点
|
||||
// ,tips: false //关闭提示文本
|
||||
// ,input: true //输入框
|
||||
// ,range: true //范围选择
|
||||
// ,sliderValue: function(value){ //回调实时显示当前值
|
||||
// console.log(value)
|
||||
// }
|
||||
// ,setTips: function(value){ //自定义提示文本
|
||||
// return '离世界末日还有' + value + '天';
|
||||
// }
|
||||
// ,vertical: true //垂直滑块,默认横向
|
||||
// ,height: '400' //配合 vertical 参数使用,默认200px
|
||||
// ,disabled: true //禁用滑块
|
||||
// ,color: '#2F4056' //主题色
|
||||
//,type: 'vertical'
|
||||
//,min: 0 //最小值
|
||||
//,max: 100 //最大值
|
||||
//,value: 60 //[40, 60] //初始值
|
||||
//,step: 20 //间隔值
|
||||
//,showstep: true //间隔点
|
||||
//,tips: false //关闭提示文本
|
||||
,input: true //输入框
|
||||
//,range: true //范围选择
|
||||
,change: function(value){ //回调实时显示当前值
|
||||
console.log(value)
|
||||
}
|
||||
//,setTips: function(value){ //自定义提示文本
|
||||
//return '离世界末日还有 ' + value + ' 天';
|
||||
//}
|
||||
//,height: '300' //配合 type:'vertical' 参数使用,默认200px
|
||||
//,disabled: true //禁用滑块
|
||||
//,theme: '#c00' //主题色
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user