bbsimonbb
bbsimonbb

Reputation: 29020

How do I render markup for a css grid with Vue?

I want to start using css grid. With grid, there is no <tr> element. All top level children of a grid container become cells. The layout engine breaks them into lines based on their attributes, and the number of columns in the grid-template-columns rule. And there's the rub: without a <tr>, where do I put my v-for? Each iteration of v-for needs to generate n elements. I need a magic disappearing element that leaves no trace in the rendered output (no trace of itself, but renders all it's children). Does this exist? How do people deal with this?

Upvotes: 1

Views: 192

Answers (1)

bbsimonbb
bbsimonbb

Reputation: 29020

Ok found it. Here's a little record if anyone follows me here.

Put the v-for on a template element.

Upvotes: 4

Related Questions