
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
vue-data-loading
Advanced tools
Another component for infinite scroll and pull down/up to load data.
Here is a demo of HackNews
npm install vue-data-loading --save
Import first:
import VueDataLoading from 'vue-data-loading'
The only you need to do is wrapping your data with vue-data-loading
tag.
<vue-data-loading>
<ul>
<li v-for="(item, index) in list" :key="index">Item: {{item}}</li>
</ul>
</vue-data-loading>
However, you can pass some props
or events
to the component.
<vue-data-loading :loading="loading" :listens="['pull-down', 'infinite-scroll']" @infinite-scroll="infiniteScroll" @pull-down="pullDown">
<!--your data here-->
</vue-data-loading>
And sometimes, you may want to change the default slot
:
Here is a example for infinite-scroll
slot:
default:
<slot :name="infinite-scroll-loading">加载中...</slot>
edit:
<div slot="infinite-scroll-loading" class="some-style-you-like">loading...</div>
Here is a full example
Type: boolean
Default: false
The component will not trigger event while loading
is true
, so you can use it to fetch data.
Type: boolean
Default: false
The component will not trigger infinite-scroll
if true
.
Type: number
Default: 60
Unit: px
Only available for touch*
event, when pull distance is not less than it, pull-down
or pull-up
will be emitted.
Type: number
Default: 0
Unit: px
Sometimes you want to change bottom offset.
Type: array
Default: ['infinite-scroll', 'pull-down', 'pull-up']
The component will not trigger infinite-scroll
if it not in the list.
Type: string
Required: false
All events
bind on window
if it is not set, or you need to specify a container ref
to it.
Emit when container has already scrolled to bottom of window
Emit when container has already pulled down
Emit when container has already pulled up
Display when container has already scrolled to bottom of window and data is loading
Display when distance of pull-down
is less then distance
prop
Display when distance of pull-down
is not less then distance
prop
Display when container has already pull-down
and data is loading
Display when distance of pull-up
is less then distance
prop
Display when distance of pull-up
is not less then distance
prop
Display when container has already pull-up
and data is loading
# install dependencies
npm install
# serve example with hot reload at localhost:8080
npm run dev
# build for example production with minification
npm run build
# build for example production and view the bundle analyzer report
npm run build --report
# build vue-data-loading component
npm run dist
FAQs
Another component for infinite scroll and pull down/up to load data.
The npm package vue-data-loading receives a total of 46 weekly downloads. As such, vue-data-loading popularity was classified as not popular.
We found that vue-data-loading demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.