|
[BUG]
UISelector是不是对版本要有要求,怎么放在IOS7.1上不起作用?
[复制链接]
本帖最后由 為大哥科學家 于 2016-3-21 13:51 编辑
如题,把uiselector在IOS7.1上运行无效(尝试过弄回调函数),无论是打包还是apploader。已经添加模块模块了。
代码如下:
- UISelector = api.require('UISelector');
- UISelector.open({
- rect: {
- x: 0,
- y: header_h + main_h,
- w: body_w,
- h: body_h - header_h - main_h
- },
- styles:{
- bg: '#fff',
- text: {
- size: 14,
- selected: '#1abc9c',
- normal: '#989898'
- },
- item: {
- w: 80,
- h: 38,
- normal: '#fff',
- selected: '#fff',
- zoomIn: 1.2
- }
- },
- rows: 5,
- bounce: false,
- fixed: true,
- data: 'widget://res/cityList.json'
- },function( ret, err){
- if( ret ){
- if (ret.eventType == 'show') {
- UISelector.hide();
- }
- /*alert(JSON.stringify(ret));*/
- if (ret.eventType == 'selected') {
- $province = ret.selects[0].content;
- $city = ret.selects[1].content == "--" ? '':ret.selects[1].content;
- $area = ret.selects[2] ? ret.selects[2].content:'';
- if (ret.selects[2]) $area = ret.selects[2].content == "--" ? '':ret.selects[2].content;
- }
- }else{
- alert(JSON.stringify(err));
- }
- });
复制代码
|
|