uniapp底部弹出层

 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;
                           
                        }
                    }
                })
            }
        }
posted @ 2023-08-03 15:31  干红  阅读(230)  评论(0编辑  收藏  举报