美文网首页
mui 相机选择

mui 相机选择

作者: 月光_薛 | 来源:发表于2018-06-05 10:48 被阅读0次

document.querySelector('.uInfoImg').addEventListener('tap',function(){
var a = [{
title: "拍照"
}, {
title: "从手机相册选择"
}];
plus.nativeUI.actionSheet({
title: "修改头像",
cancel: "取消",
buttons: a
}, function(b) {
switch(b.index) {
case 0:
break;
case 1:
getImage();
break;
case 2:
galleryImg();
break;
default:
break
}
})
})

相关文章