分享你我的心得.
共乘一片美好网络.

showModal的使用

// 编辑用户性别
tapSex:function(res){
var that = this
wx.showModal({
title: ‘选择性别’,
content: ”,
cancelText:’女’,
confirmText:’男’,
success(res){
if(res.cancel){
// 用户点击了取消属性的按钮,对应选择了’女’
that.setData({
userSex:2
})
}else if(res.confirm){
// 用户点击了确定属性的按钮,对应选择了’男’
that.setData({
userSex:1
})
}
}
})

}

赞(0)
未经允许不得转载:小叶白龙博客 » showModal的使用
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址