refs #1766 Introduce vue-virtual-scroll in Search/Tag

This commit is contained in:
AkiraFukushima 2020-10-19 23:44:13 +09:00
parent e688cee974
commit 8353818492
1 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,12 @@
<template>
<div id="search_tag">
<template v-for="tag in results">
<tag :tag="tag"></tag>
</template>
<DynamicScroller :items="results" :min-item-size="46" key-field="name" class="scroller" page-mode>
<template v-slot="{ item, index, active }">
<DynamicScrollerItem :item="item" :active="active" :size-dependencies="[item.name]" :data-index="index">
<tag :tag="item"></tag>
</DynamicScrollerItem>
</template>
</DynamicScroller>
</div>
</template>
@ -18,7 +22,7 @@ export default {
results: state => state.results
})
},
destroyed () {
destroyed() {
this.$store.commit('TimelineSpace/Contents/Search/Tag/updateResults', [])
}
}