Appearance
Installation
npm install v3-infinite-loading
Basic usage
register globally
import InfiniteLoading from "v3-infinite-loading";
import "v3-infinite-loading/lib/style.css"; //required if you're not going to override default slots
const app = createApp(App);
app.component("infinite-loading", InfiniteLoading);
app.mount("#app");
usage in SFC with script setup
<script setup>
import InfiniteLoading from "v3-infinite-loading";
import "v3-infinite-loading/lib/style.css"; //required if you're not going to override default slots
const loadData = ($state) {
//calling the api
}
</script>
<template>
<InfiniteLoading @infinite="loadData" />
</template>