v-scroll
ディレクティブによって、ウィンドウや特定の要素がスクロールされた際のコールバック関数を設定することができます。
以下に、簡単な例から複雑な例まで示します。
指定した要素にイベントリスナーをバインドすることもできます。
v-scroll
targets the window
by default but can also watch the element it's being bound to. In the following example we use the self modifier, v-scroll.self
, to watch the v-card
element specifically. This causes the method onScroll
to invoke as you scroll the card contents; incrementing the counter.
Caught a mistake or want to contribute to the documentation?
Edit Layout
on GitHub!