彩虹
彩虹
  • 发布:2016-08-15 14:47
  • 更新:2016-08-15 15:02
  • 阅读:3326

mui.PopPicker 省市区三级联动的时候弹出的数据划不动,停留在当前页面按手机Menu键锁定屏幕后再按手机Menu键解锁屏幕后就可以滑动了!

分类:MUI

手机型号:华为荣耀7
系统版本:Android 5.0.2
代码示例:

        mui.ready(function() {  
           loadCityDatas();//加载数据  
           var cityPicker = new mui.PopPicker({  
               layer: 3  
           });  
           var showCityPickerButton = doc.getElementById('showCityPicker');  
           var areaId = doc.getElementById('areaId');  
           var areaPath = doc.getElementById('areaPath');  

           showCityPickerButton.addEventListener('tap', function (event) {  
               if(typeof(cityDatas) == 'undefined' || cityDatas == null) {  
                   loadCityDatas();  
                   if(isLoadingCityDatas){  
                       var interval = window.setInterval(function(){  
                           if(isLoadingCityDatas){  
                               console.log("Loading city datas ...");  
                           }else{  
                               window.clearInterval(interval);  
                               console.log("Load city datas over");  
                               cityPicker.setData(JSON.parse(cityDatas));  
                           }  
                       },100);  

                   }else{  
                       cityPicker.setData(JSON.parse(cityDatas));  
                   }  
               }else{  
                   cityPicker.setData(JSON.parse(cityDatas));  
               }  
               cityPicker.show(function (items) {  
                   var address = "";  
                   var value = "";  
                   if( items[0] != null && typeof(items[0].text) != 'undefined'  ){  
                       address = address + items[0].text;  
                       value = items[0].value;  
                       if( items[1] != null && typeof(items[1].text) != 'undefined'  ){  
                           address = address + " " + items[1].text;  
                           value = items[1].value;  
                           if( items[2] != null && typeof(items[2].text) != 'undefined'  ){  
                               address = address + " " + items[2].text;  
                               value = items[2].value;  
                           }  
                       }  
                   }  
                   showCityPickerButton.innerHTML = address;  
                   var pathArray = value.split(",");  
                   areaId.value = pathArray[pathArray.length - 1];  
                   areaPath.value = value;  
               });  
           }, false);  
        });  
2016-08-15 14:47 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

请上传能重现问题的测试工程.

该问题目前已经被锁定, 无法添加新回复