Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_showError(e) {
Message.error(e.message);
}
onCancel() {
Message.error('You clicked cancel button.');
}
_showErrorTip(c, value) {
Message.error('Please enter digits.');
}
_onError(err) {
Message.error(err.message);
}
onAdd() {
const users = this.state.checkedUsers;
const room = this.state.checkedRooms[0];
if (users.length > 2) {
return Message.error('当前房间最多容纳两人');
}
users.forEach(user => {
user.room = room;
room.users.push(user);
});
this.setState({'checkedUsers': [], 'checkedRooms': []});
}