Lucy
Lucy
NNuxt
Created by Lucy on 7/11/2024 in #❓・help
Alternating between two divs with v-for?
I have an array of "tile data" and I am trying to achieve the following pattern:
<div class="mosaic-root">
<div class="mosaic-tile"></div>
<div class="mosaic-split"></div>
<div class="mosaic-tile"></div>
<div class="mosaic-split"></div>
<div class="mosaic-tile"></div>
</div>
<div class="mosaic-root">
<div class="mosaic-tile"></div>
<div class="mosaic-split"></div>
<div class="mosaic-tile"></div>
<div class="mosaic-split"></div>
<div class="mosaic-tile"></div>
</div>
I don't want to have wrappers around one tile and split for example, since the point is to have the splits right next to two tiles. Is this achievable with v-for?
4 replies
NNuxt
Created by Lucy on 7/8/2024 in #❓・help
Type recognised everywhere but the component
I declared an interface in the /types directory. I can use this type in app.vue and under /pages. However, when I use it in a component, I get: Unresolvable type reference or unsupported built-in utility type. Here is a stackblitz replicating the issue: https://stackblitz.com/edit/github-o4bvcj?file=app.vue If you comment out the usage of the TileData type in the component it starts to work again even though it's still used in app.vue
4 replies