A question, such as a question, is not a value of the listening object, but an attempt to obtain the attribute that has changed
.the environmental background of the problems and what methods you have tried
the following way of writing has been tried to listen for more object properties, so the mind is greatly inspired to wonder whether it is possible to listen for current changes and deal with them directly
"rooms.a.b" (oldval,newval) {
....
}
"rooms.a.c" (oldval,newval) {
....
}
"rooms.b.a" (oldval,newval) {
....
}
related codes
rooms: {
handler(val) {
this.scrollDown();
if (!this.currentRoom) return;
try {
sessionStorage.setItem(this.currentRoom, JSON.stringify(content));
} catch (oException) {
if (oException.name === "QuotaExceededError") {
layer.msg(",!");
//
sessionStorage.removeItem(this.currentRoom);
this.rooms[this.currentRoom].historyContent = [];
}
}
},
deep: true
},
what result do you expect? What is the error message actually seen?
because there are many attributes of objects that need to be listened to, is it feasible to listen to objects directly and get the attributes that have changed currently?