**VueEasyPullRefresh** is a lightweight, easy-to-use pull-to-refresh plugin for Vue 3. With just a few lines of code, you can add pull-to-refresh functionality to your app, supporting both mobile and desktop platforms. Customize the loader, control refres
npm install vue-easy-pull-refreshVueEasyPullRefresh is a lightweight, easy-to-use pull-to-refresh plugin for Vue 3. With just a few lines of code, you can add pull-to-refresh functionality to your app, supporting both mobile and desktop platforms. Customize the loader, control refresh behavior, and manage asynchronous tasks seamlessly.
Install VueEasyPullRefresh via npm:
``bash`
npm install vue-easy-pull-refresh
To use VueEasyPullRefresh in your Vue 3 project, follow these simple steps:
Import the component into your Vue component:
`vue
`
| Prop | Type | Default | Description |
|-----------------------|----------|---------|--------------------------------------------------------------|
| isRefreshContent | Boolean| true | Enable or disable refresh content |isAppearAnimation
| | Boolean| true | Enable or disable the opacity animation (only when isRefreshContent is true) |isDisabled
| | Boolean| false | Disable pull-to-refresh functionality |pullDownThreshold
| | Number | 64 | The distance required for the user to pull down to trigger refresh |
- reached: Emitted when the pull-to-refresh threshold is reached and the refresh process begins.
- settled: Emitted when the refresh animation is fully completed and the component has returned to its idle state.
- loader: Customize the loading indicator shown during refresh. If not provided, a default loader will be used.
In some cases, you may need to interact directly with the pull-to-refresh logic within your component. You can use the useEasyPullRefresh function to add asynchronous tasks to the refresh queue.
`vue
``
This project is licensed under the MIT License - see the LICENSE file for details.