仮想スクロール
Looking for
ion-virtual-scroll
?ion-virtual-scroll
was deprecated in v6.0.0 and removed in v7.0.0. We recommend using a Vue library to accomplish this. We outline one approach using vue-virtual-scroller
below.
Installation
To setup the virtual scroller, first install vue-virtual-scroller
:
npm install vue-virtual-scroller@next
注記
Be sure to use the next
tag otherwise you will get a version of vue-virtual-scroll
that is only compatible with Vue 2.
From here, we need to import the virtual scroller's CSS into our app. In main.ts
, add the following line:
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
Registering Virtual Scroll Components
Now that we have the package installed and the CSS imported, we can either import all virtual scroll components or only import the components we want to use. This guide will show how to do both.