Discussion icon indicating copy to clipboard operation
Discussion copied to clipboard

Computed property $index value in v-repeat

Open Mat-Moo opened this issue 10 years ago • 4 comments

Probably missing something simple, but I need to know what the current index of a v-repeat is for a computed variable. This will return (Depending on another option) a bullet with A/B/C or 1/2/3 etc. (Based on that index). Originally I thought this was to do with caching because this.$index (In a component) was showing 0, but adding cache:false just shows this.$index as 0 twice now (So I know it's being called correctly).

Mat-Moo avatar Aug 30 '15 21:08 Mat-Moo

@Mat-Moo Need a reproduction in order to debug it.

young-steveo avatar Aug 31 '15 18:08 young-steveo

Not a bug it's a question, how can I access the current $index of a v-Repeat (now v-for) in a computed variable?

Mat-Moo avatar Aug 31 '15 23:08 Mat-Moo

same doubt here! :+1: @Mat-Moo

jonathanpmartins avatar Sep 15 '15 00:09 jonathanpmartins

Hey, I had the same question, wasnt able to find anything on the forums as well. Would be great help if you could answer this

mayureshwaykole avatar Jun 24 '16 05:06 mayureshwaykole