Fix the bug of checked checkbox would remain checked on the friends at the same position after turned to the other page (#833)

Co-authored-by: EbonCorvin <{ID}+{username}@users.noreply.github.com>
This commit is contained in:
EbonCorvin
2024-06-26 07:29:57 -04:00
committed by GitHub
parent 873c1d38f0
commit a97af6bb4e
2 changed files with 6 additions and 1 deletions

View File

@@ -22430,6 +22430,11 @@ speechSynthesis.getVoices();
$app.data.friendsListSelectAllCheckbox = false;
$app.data.friendsListBulkUnfriendMode = false;
$app.watch.friendsListBulkUnfriendMode = (newV) => {
if (!newV) {
$app.friendsListTable.data.forEach(i => delete i.$selected);
}
}
$app.methods.showBulkUnfriendSelectionConfirm = function () {
var elementsTicked = 0;
for (var ctx of this.friendsListTable.data) {

View File

@@ -32,7 +32,7 @@ mixin friendsListTab()
el-table-column(v-if="friendsListBulkUnfriendMode" width="55" prop="$selected")
template(v-once #default="scope")
el-button(type="text" size="mini" @click.stop)
el-checkbox(v-model="scope.row.$selected")
el-checkbox(@change="$app.$set(scope.row, '$selected', $event)" :value="'$selected' in scope.row?scope.row.$selected:false")
el-table-column(:label="$t('table.friendList.no')" width="70" prop="$friendNum" sortable="custom")
el-table-column(:label="$t('table.friendList.avatar')" width="70" prop="photo")
template(v-once #default="scope")