methods: {
changeRelation() {
uni.showActionSheet({
itemList:['妻子','丈夫','妈妈','爸爸','爷爷','奶奶','儿子','女儿','兄弟姐妹','亲戚','同学','同事','朋友','长辈','其他'],
success: (res) => {
switch(res.tapIndex){
case 0:
this.friendInfo.friendRelation = '妻子'
return;
case 1:
this.friendInfo.friendRelation = '丈夫'
return;
case 2:
this.friendInfo.friendRelation = '妈妈'
return;
case 3:
this.friendInfo.friendRelation = '爸爸'
return;
case 4:
this.friendInfo.friendRelation = '爷爷'
return;
case 5:
this.friendInfo.friendRelation = '奶奶'
return;
}
}
})
}
}
标签:case,uniapp,return,friendInfo,res,弹出,底部,friendRelation
From: https://www.cnblogs.com/shuhan-hou/p/16902440.html