Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyhom committed Dec 16, 2017
1 parent b26af14 commit a2f4ce1
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="wap-font-scale" content="no">
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1,user-scalable=no">
<meta name="keywords" content="">
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="css/public.css">

Expand Down Expand Up @@ -63,22 +63,22 @@ <h1>mobileSelect Demo</h1>
id:'1',
value:'标准版'
},
{
{
id:'2',
value:'加长版'
},
{
{
id:'3',
value:'巅峰之旅'
},
{
{
id:'4',
value:'流光熠世'
},
{
{
id:'5',
value:'都会典藏版'
}
}
]
},
{
Expand All @@ -93,11 +93,11 @@ <h1>mobileSelect Demo</h1>
id:'2',
value:'永恒之爱'
},
{
{
id:'3',
value:'英骥'
},
{
{
id:'4',
value:'阿尔卑斯典藏版'
}
Expand Down Expand Up @@ -137,7 +137,7 @@ <h1>mobileSelect Demo</h1>
}
]
},
{
{
id:'2',
value:'欧陆',
childs:[
Expand Down Expand Up @@ -216,21 +216,21 @@ <h1>mobileSelect Demo</h1>
* @function updateWheel() 参数 sliderIndex, data 重新渲染指定的轮子(可用于先实例化,后通过ajax获取数据的场景)
* @function updateWheels() 参数 data 重新渲染所有轮子,仅限级联数据格式使用(可用于先实例化,后通过ajax获取数据的场景)
* @function locatePosition() 参数 sliderIndex, posIndex 传入位置数组,重定位轮子的位置
* @function show() 参数 无参 唤起弹窗组件
* @function getValue() 参数 无参 获取组件选择的值
* @function show() 参数 无参 唤起弹窗组件
* @function getValue() 参数 无参 获取组件选择的值
*/



var mobileSelect1 = new MobileSelect({
trigger: '#trigger1',
title: '单项选择',
trigger: '#trigger1',
title: '单项选择',
wheels: [
{data: weekdayArr}
],
position:[2], //初始化定位 打开时默认选中的哪个 如果不填默认为0
transitionEnd:function(indexArr, data){
console.log(data);
//console.log(data);
},
callback:function(indexArr, data){
console.log(data);
Expand All @@ -247,7 +247,7 @@ <h1>mobileSelect Demo</h1>
],
position:[1, 2],
transitionEnd:function(indexArr, data){
console.log(data);
//console.log(data);
},
callback:function(indexArr, data){
console.log(data);
Expand All @@ -265,9 +265,9 @@ <h1>mobileSelect Demo</h1>
{data: numArr},
{data: numArr}
],
position:[0, 1, 0, 1, 0],
position:[0, 1, 0, 1, 0],
transitionEnd:function(indexArr, data){
console.log(data);
//console.log(data);
},
callback:function(indexArr, data){
console.log(data);
Expand Down Expand Up @@ -299,11 +299,11 @@ <h1>mobileSelect Demo</h1>
]}
],
transitionEnd:function(indexArr, data){
console.log(data);
//console.log(data);
},
callback:function(indexArr, data){
console.log(data);
}
}
});


Expand All @@ -315,13 +315,10 @@ <h1>mobileSelect Demo</h1>
],
position: [2,0],
transitionEnd:function(indexArr, data){
console.log(data);
//console.log(data);
},
callback:function(indexArr, data){
console.log(data);
},
cancel: function(pa1, pa2){
console.log(pa1, pa2);
}
});

Expand Down

0 comments on commit a2f4ce1

Please sign in to comment.