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!