refs #1766 Introduce vue-virtual-scroll in Bookmarks

This commit is contained in:
AkiraFukushima 2020-10-17 01:34:19 +09:00
parent f480124e46
commit e23f3c2ad4
1 changed files with 17 additions and 13 deletions

View File

@ -1,19 +1,23 @@
<template>
<div id="bookmarks" v-shortkey="shortcutEnabled ? { next: ['j'] } : {}" @shortkey="handleKey">
<div v-shortkey="{ linux: ['ctrl', 'r'], mac: ['meta', 'r'] }" @shortkey="reload()"></div>
<div class="bookmark" v-for="message in bookmarks" v-bind:key="message.id">
<DynamicScroller :items="bookmarks" :min-item-size="60" class="scroller" page-mode>
<template v-slot="{ item, index, active }">
<DynamicScrollerItem :item="item" :active="active" :size-dependencies="[item.uri]" :data-index="index">
<toot
:message="message"
:focused="message.uri === focusedId"
:message="item"
:focused="item.uri === focusedId"
:overlaid="modalOpened"
v-on:update="updateToot"
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
@focusRight="focusSidebar"
@selectToot="focusToot(message)"
@selectToot="focusToot(item)"
></toot>
</div>
</DynamicScrollerItem>
</template>
</DynamicScroller>
<div class="loading-card" v-loading="lazyLoading" :element-loading-background="backgroundColor"></div>
<div :class="openSideBar ? 'upper-with-side-bar' : 'upper'" v-show="!heading">
<el-button type="primary" icon="el-icon-arrow-up" @click="upper" circle> </el-button>