How does VUE get the length of an array with the _ _ ob__: Observer attribute?

this array prints out console.log (this.chooseId) :
clipboard.png

Why is the

output this.chooseId.length output 0?
how should I get his length?

Mar.21,2021

to get the length of the array is the this.chooseId.length method, there is no doubt about this, and you output this.chooseId.length to 0 because you got it at the wrong time, don't you believe it? You put the print in a setTimeout function. That means you get the length before you add data to this.chooseId.

Menu