10
This commit is contained in:
@@ -9,8 +9,14 @@
|
||||
<view class="tab_container">
|
||||
<template v-if="activeTab === 0">
|
||||
<setting-item @click="tabChange(tabs[0].idx)" :title="tabs[0].title" :border="false" />
|
||||
|
||||
<view class="tab_pane"></view>
|
||||
<view class="tab_pane">
|
||||
<user-item
|
||||
@updateCheck="updateCheckedUser"
|
||||
:checked="checkedUserIDList.includes(cell.userID)"
|
||||
:disabled="disabledUserIDList.includes(cell.userID)"
|
||||
:checkVisible="true"
|
||||
v-for="cell in storeConversationList" :item="cell" :key="cell.userID" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
@@ -21,7 +27,7 @@
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<choose-index-footer :comfirmLoading="comfirmLoading" @removeItem="updateCheckedUserOrGroup" @confirm="confirm"
|
||||
<choose-index-footer v-show="limit != 1" :comfirmLoading="comfirmLoading" @removeItem="updateCheckedUserOrGroup" @confirm="confirm"
|
||||
:choosedData="getCheckedInfo" />
|
||||
</view>
|
||||
</template>
|
||||
@@ -60,6 +66,7 @@
|
||||
title: "我的好友",
|
||||
},
|
||||
],
|
||||
limit:0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -99,16 +106,17 @@
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
const {groupID,type,checkedUserIDList,} = options;
|
||||
console.log(this.storeFriendList);
|
||||
const {groupID,type,checkedUserIDList,limit} = options;
|
||||
//console.log(this.storeFriendList);
|
||||
this.type = type;
|
||||
this.groupID = groupID;
|
||||
this.checkedUserIDList = checkedUserIDList ?
|
||||
JSON.parse(checkedUserIDList) :
|
||||
[];
|
||||
this.checkedUserIDList = checkedUserIDList ? JSON.parse(checkedUserIDList) : [];
|
||||
if (this.type === ContactChooseTypes.Invite) {
|
||||
this.checkDisabledUser();
|
||||
}
|
||||
if(limit){
|
||||
this.limit = limit;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkDisabledUser() {
|
||||
@@ -131,16 +139,19 @@
|
||||
this.updateCheckedUser(item);
|
||||
}
|
||||
},
|
||||
updateCheckedUser({
|
||||
userID
|
||||
}) {
|
||||
if (this.checkedUserIDList.includes(userID)) {
|
||||
const idx = this.checkedUserIDList.findIndex((item) => item === userID);
|
||||
const tmpArr = [...this.checkedUserIDList];
|
||||
tmpArr.splice(idx, 1);
|
||||
this.checkedUserIDList = [...tmpArr];
|
||||
} else {
|
||||
this.checkedUserIDList = [...this.checkedUserIDList, userID];
|
||||
updateCheckedUser({userID}) {
|
||||
if(this.limit == 1){
|
||||
this.checkedUserIDList = [userID];
|
||||
this.confirm();
|
||||
}else{
|
||||
if (this.checkedUserIDList.includes(userID)) {
|
||||
const idx = this.checkedUserIDList.findIndex((item) => item === userID);
|
||||
const tmpArr = [...this.checkedUserIDList];
|
||||
tmpArr.splice(idx, 1);
|
||||
this.checkedUserIDList = [...tmpArr];
|
||||
} else {
|
||||
this.checkedUserIDList = [...this.checkedUserIDList, userID];
|
||||
}
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
@@ -215,7 +226,7 @@
|
||||
.title {
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
// padding: 16rpx 8rpx;
|
||||
background: #f8f9fa;
|
||||
|
||||
Reference in New Issue
Block a user