S
S
SPART4K2021-07-20 13:35:31
Vue.js
SPART4K, 2021-07-20 13:35:31

How to properly render lists of 3 in vue js?

Good afternoon.
Let's say I have JSON like this:

[
{
    "id": 1,
    "brand": "adidas",
},
{
    "id": 2,
    "brand": "nike",
},
{
    "id": 3,
    "brand": "puma",
},
]


Etc.

I want to achieve such rendering so that there are 3 separately rendered elements in each row, and so on. and also each line was drawn through v-for
60f6a5f86aea2243777758.png

Please tell me how to achieve such a result

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kuznetsov, 2021-07-20
@dima9595

remove the Vue tag as your issue is not a VueJS issue.
Read about flex'y, grid'y. Should help.

A
Alexey Yarkov, 2021-07-20
@yarkov Vue.js

We just break the array into chunks of 3 elements and output. We break it down as you like, at least this way .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question