Open History to see the last commit
1<template>
2 <div>
3 <p>
4 These components are using <strong>dynamic</strong> sizes. This means that
5 each element's exact dimensions are unknown when rendered. An estimated
6 dimension is used as the initial measurement, then this measurement is
7 readjusted on the fly as each element is rendered.
8 </p>
9 <nav>
10 <ul>
11 <li>
12 <a href="/">List</a>
13 </li>
14 <li>
15 <a href="/window-list">List - window as scroller</a>
16 </li>
17 <li>
18 <a href="/columns">Column</a>
19 </li>
20 <li>
21 <a href="/grid">Grid</a>
22 </li>
23 </ul>
24 </nav>
25 <RowVirtualizerDynamic v-if="pathname === '/'" />
26 <RowVirtualizerDynamicWindow v-else-if="pathname === '/window-list'" />
27 <ColumnVirtualizerDynamic v-else-if="pathname === '/columns'" />
28 <GridVirtualizerDynamic v-else-if="pathname === '/grid'" />
29 <div v-else>Not found</div>
30 </div>
31</template>
32β
33<script setup lang="ts">
34import { computed } from 'vue'
35import RowVirtualizerDynamic from './components/RowVirtualizerDynamic.vue'
36import RowVirtualizerDynamicWindow from './components/RowVirtualizerDynamicWindow.vue'
37import ColumnVirtualizerDynamic from './components/ColumnVirtualizerDynamic.vue'
38import GridVirtualizerDynamic from './components/GridVirtualizerDynamic.vue'
39β
40const pathname = computed(() => window.location.pathname)
41</script>