Table remove row

// add and remove a row in the table 
addAppointUser (row) {
if judged to have been // added through
the let userTables = this.addUsersTable
for (the let I = 0; I <userTables.length; I ++) {
IF (userTables [I] === row.userId .userId) {
return
}
}
// Row passed to an object,
// add the object from one array to addUsersTable defined in the table show that this array

let users = this. addUsersTable
users.push (Row)
},
removeAppointUser (Row) {
// object passed then determines whether there is an array, the presence removing
the let userTables = this.addUsersTable
for (the let I = 0; I <userTables.length; I ++ ) {
IF (userTables [i] .userId === row.userId) {
userTables.splice (i,. 1) // begin removing method of removing from an element i
}
}
},

 Reprinted from:  https://www.cnblogs.com/qipan/p/11599835.html


 

Guess you like

Origin www.cnblogs.com/qipan/p/11599835.html