Customize the waterfall using slots
masterThe component provides several slots for customization:
default: Custom picture description element. Providesprops.indexandprops.value(the item fromimgsArr).loading: Custom loading element. Provides{ isFirstLoad }.waterfall-head: Content to be placed at the top of the waterfall container.waterfall-over: Content to be shown when thewaterfallOvermethod is called.
<!-- Default Slot Example -->
<vue-waterfall-easy :imgsArr="imgsArr" @scrollReachBottom="getData">
<div class="img-info" slot-scope="props">
<p class="some-info">picture index: {{props.index}}</p>
<p class="some-info">{{props.value.info}}</p>
</div>
</vue-waterfall-easy
<!-- Loading Slot Example -->
<div slot="loading" slot-scope="{isFirstLoad}">
<div v-if="isFirstLoad">first-loading...</div>
<div v-else>loading...</div>
</div>
<!-- Waterfall Over Slot Example -->
<div slot="waterfall-over">No more data</div>