0👍
If you want to count your objects, then just count your data. No need to involve DOM.
section.list
is an array, so section.list.length
should give you desired count.
Also, as mentioned in the answer before, use some unique property of item
(for example some sort of id) as the value for :key
attribute.
- [Vuejs]-Unescape returned value from filters
- [Vuejs]-How to add event listeners to Vue socket cluster client in a method?
-1👍
You can’t do it like this, Vue.js is reactive framework and you should learn a little bit before asking these kind of questions – https://v2.vuejs.org/v2/guide/reactivity.html
Use your key
as id
instead
- [Vuejs]-Vue.js component with Vuex.js (instead of vue-i18n.js)
- [Vuejs]-How to use Vue JS transition "inside" another transition?
Source:stackexchange.com