自定义的数据,从sqlite中获取数据,很不灵敏,需要按多次才弹出选择界面,选择界面出现过一次以后,就灵敏了,每次按都出来
function getcheckoutday(){
var sql = 'select RecoId as value,Cname as text From basecheckoutday Where RecoType = "1" Order By BillNo; '
db.doQuery(sql, function(result) {
var userPicker = new mui.PopPicker();
userPicker.setData(result);
var showUserPickerButton = document.getElementById('checkoutday');
showUserPickerButton.addEventListener('tap', function(event) {
userPicker.show(function(items) {
showUserPickerButton.setAttribute("data-col", items[0].value);
showUserPickerButton.value = items[0].text;
userPicker.CLOSED;
//返回 false 可以阻止选择框的关闭
//return false;
});
}, false);
});
}
0 个回复