Skip to content

Commit

Permalink
docs(examples): removed unneeded template tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kouts committed Oct 16, 2023
1 parent 6dd5b4d commit cc8a185
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 44 deletions.
41 changes: 19 additions & 22 deletions examples/vue/fixed/src/components/GridVirtualizerFixed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,29 @@
}"
>
<template v-for="virtualRow in virtualRows" :key="virtualRow.index">
<template
<div
v-for="virtualColumn in columnVirtualizer.getVirtualItems()"
:key="virtualColumn.index"
>
<div
:class="
virtualColumn.index % 2
? virtualRow.index % 2 === 0
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
:class="
virtualColumn.index % 2
? virtualRow.index % 2 === 0
? 'ListItemOdd'
: 'ListItemEven'
"
:style="{
position: 'absolute',
top: 0,
left: 0,
width: `${virtualColumn.size}px`,
height: `${virtualRow.size}px`,
transform: `translateX(${virtualColumn.start}px) translateY(${virtualRow.start}px)`,
}"
>
Cell {{ virtualRow.index }}, {{ virtualColumn.index }}
</div>
</template>
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
"
:style="{
position: 'absolute',
top: 0,
left: 0,
width: `${virtualColumn.size}px`,
height: `${virtualRow.size}px`,
transform: `translateX(${virtualColumn.start}px) translateY(${virtualRow.start}px)`,
}"
>
Cell {{ virtualRow.index }}, {{ virtualColumn.index }}
</div>
</template>
</div>
</div>
Expand Down
41 changes: 19 additions & 22 deletions examples/vue/variable/src/components/GridVirtualizerVariable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,29 @@
}"
>
<template v-for="virtualRow in virtualRows" :key="virtualRow.index">
<template
<div
v-for="virtualColumn in virtualColumns"
:key="virtualColumn.index"
>
<div
:class="
virtualColumn.index % 2
? virtualRow.index % 2 === 0
? 'ListItemOdd'
: 'ListItemEven'
: virtualRow.index % 2
:class="
virtualColumn.index % 2
? virtualRow.index % 2 === 0
? 'ListItemOdd'
: 'ListItemEven'
"
:style="{
position: 'absolute',
top: 0,
left: 0,
width: `${columns[virtualColumn.index]}px`,
height: `${rows[virtualRow.index]}px`,
transform: `translateX(${virtualColumn.start}px) translateY(${virtualRow.start}px)`,
}"
>
Cell {{ virtualRow.index }}, {{ virtualColumn.index }}
</div>
</template>
: virtualRow.index % 2
? 'ListItemOdd'
: 'ListItemEven'
"
:style="{
position: 'absolute',
top: 0,
left: 0,
width: `${columns[virtualColumn.index]}px`,
height: `${rows[virtualRow.index]}px`,
transform: `translateX(${virtualColumn.start}px) translateY(${virtualRow.start}px)`,
}"
>
Cell {{ virtualRow.index }}, {{ virtualColumn.index }}
</div>
</template>
</div>
</div>
Expand Down

0 comments on commit cc8a185

Please sign in to comment.