Skip to content

Commit a2f4ce1

Browse files
committed
update demo
1 parent b26af14 commit a2f4ce1

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

demo.html

+21-24
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
88
<meta name="wap-font-scale" content="no">
99
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1,user-scalable=no">
10-
<meta name="keywords" content="">
10+
<meta name="keywords" content="">
1111
<meta name="description" content="">
1212
<link rel="stylesheet" type="text/css" href="css/public.css">
1313

@@ -63,22 +63,22 @@ <h1>mobileSelect Demo</h1>
6363
id:'1',
6464
value:'标准版'
6565
},
66-
{
66+
{
6767
id:'2',
6868
value:'加长版'
6969
},
70-
{
70+
{
7171
id:'3',
7272
value:'巅峰之旅'
7373
},
74-
{
74+
{
7575
id:'4',
7676
value:'流光熠世'
7777
},
78-
{
78+
{
7979
id:'5',
8080
value:'都会典藏版'
81-
}
81+
}
8282
]
8383
},
8484
{
@@ -93,11 +93,11 @@ <h1>mobileSelect Demo</h1>
9393
id:'2',
9494
value:'永恒之爱'
9595
},
96-
{
96+
{
9797
id:'3',
9898
value:'英骥'
9999
},
100-
{
100+
{
101101
id:'4',
102102
value:'阿尔卑斯典藏版'
103103
}
@@ -137,7 +137,7 @@ <h1>mobileSelect Demo</h1>
137137
}
138138
]
139139
},
140-
{
140+
{
141141
id:'2',
142142
value:'欧陆',
143143
childs:[
@@ -216,21 +216,21 @@ <h1>mobileSelect Demo</h1>
216216
* @function updateWheel() 参数 sliderIndex, data 重新渲染指定的轮子(可用于先实例化,后通过ajax获取数据的场景)
217217
* @function updateWheels() 参数 data 重新渲染所有轮子,仅限级联数据格式使用(可用于先实例化,后通过ajax获取数据的场景)
218218
* @function locatePosition() 参数 sliderIndex, posIndex 传入位置数组,重定位轮子的位置
219-
* @function show() 参数 无参 唤起弹窗组件
220-
* @function getValue() 参数 无参 获取组件选择的值
219+
* @function show() 参数 无参 唤起弹窗组件
220+
* @function getValue() 参数 无参 获取组件选择的值
221221
*/
222-
222+
223223

224224

225225
var mobileSelect1 = new MobileSelect({
226-
trigger: '#trigger1',
227-
title: '单项选择',
226+
trigger: '#trigger1',
227+
title: '单项选择',
228228
wheels: [
229229
{data: weekdayArr}
230230
],
231231
position:[2], //初始化定位 打开时默认选中的哪个 如果不填默认为0
232232
transitionEnd:function(indexArr, data){
233-
console.log(data);
233+
//console.log(data);
234234
},
235235
callback:function(indexArr, data){
236236
console.log(data);
@@ -247,7 +247,7 @@ <h1>mobileSelect Demo</h1>
247247
],
248248
position:[1, 2],
249249
transitionEnd:function(indexArr, data){
250-
console.log(data);
250+
//console.log(data);
251251
},
252252
callback:function(indexArr, data){
253253
console.log(data);
@@ -265,9 +265,9 @@ <h1>mobileSelect Demo</h1>
265265
{data: numArr},
266266
{data: numArr}
267267
],
268-
position:[0, 1, 0, 1, 0],
268+
position:[0, 1, 0, 1, 0],
269269
transitionEnd:function(indexArr, data){
270-
console.log(data);
270+
//console.log(data);
271271
},
272272
callback:function(indexArr, data){
273273
console.log(data);
@@ -299,11 +299,11 @@ <h1>mobileSelect Demo</h1>
299299
]}
300300
],
301301
transitionEnd:function(indexArr, data){
302-
console.log(data);
302+
//console.log(data);
303303
},
304304
callback:function(indexArr, data){
305305
console.log(data);
306-
}
306+
}
307307
});
308308

309309

@@ -315,13 +315,10 @@ <h1>mobileSelect Demo</h1>
315315
],
316316
position: [2,0],
317317
transitionEnd:function(indexArr, data){
318-
console.log(data);
318+
//console.log(data);
319319
},
320320
callback:function(indexArr, data){
321321
console.log(data);
322-
},
323-
cancel: function(pa1, pa2){
324-
console.log(pa1, pa2);
325322
}
326323
});
327324

0 commit comments

Comments
 (0)