省改变时候如何让市跟着改变,现在只有点击确定在点开时候才回改变。$('#showPicker').on('click', function () { weui.picker( $scope.provinces, $scope.citys, { onChange: function (result) { dataService.getCityByGrade( $scope.pro[result[0]].id,function(data1) { $scope.getCity = data1; $scope.citys = []; for(var i = 0, len = data1.length; i < len; i++){ $scope.citys.push({label: data1[i].name, value: i}); } }) $scope.$apply(function(){}) }, onConfirm: function (result) { console.log(result); $scope.searPro = $scope.provinces[result[0]].label; $scope.searCity = $scope.citys[result[1]].label; $scope.search = $scope.searPro + " " + $scope.searCity; $scope.$apply(function(){}) } });});
添加回答
举报
0/150
提交
取消