situation
because I find it troublesome to manage the open&close status of multiple modal boxes on the same page, I want to encapsulate a method for managing the status values of each modal box, as follows
toggleStatus(obj, key) {
// eslint-disable-next-line no-param-reassign
obj[key] = !obj[key];
console.log(this.status);
}
the calling method is
@click="toggleStatus(status,"showBeastsModal")"
but in use, it is found that there is a certain delay in this writing, and there is no rough
.@click="status.showBeastsModal=false)"
react quickly, I don"t know why