在我的代码中,我们使用.includes()添加用户,我尝试在https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/prototype上搜索此问题
但我找不到任何有用的东西,在我的情况下我想立即删除用户,寻找这个功能,这怎么可能?
activate(model) {
this.model = model;
this.users = this.model.users.models.map((user) => {
user.$isSelected = model.addedUsers.includes(user);
return user;
});
}
addusers() {
this.addedUsers = this.users.filter((b) => b.$isSelected);
this.dialogController.ok(this.addedUsers);
}