{"id":13535742,"url":"https://github.com/wangdahoo/vue-scroller","last_synced_at":"2025-10-25T07:26:12.462Z","repository":{"id":57298658,"uuid":"68451869","full_name":"wangdahoo/vue-scroller","owner":"wangdahoo","description":"Scroller Component for Vue.js","archived":false,"fork":false,"pushed_at":"2020-02-17T08:05:17.000Z","size":8767,"stargazers_count":1789,"open_issues_count":114,"forks_count":385,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-05-14T02:18:31.717Z","etag":null,"topics":["infinite-scroll","pull-to-refresh","vue","vue-scroller"],"latest_commit_sha":null,"homepage":"https://wangdahoo.github.io/vue-scroller/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangdahoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-17T12:50:32.000Z","updated_at":"2025-05-09T05:33:44.000Z","dependencies_parsed_at":"2022-08-26T18:02:32.774Z","dependency_job_id":null,"html_url":"https://github.com/wangdahoo/vue-scroller","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fvue-scroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fvue-scroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fvue-scroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fvue-scroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangdahoo","download_url":"https://codeload.github.com/wangdahoo/vue-scroller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101186,"owners_count":22014897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infinite-scroll","pull-to-refresh","vue","vue-scroller"],"created_at":"2024-08-01T09:00:25.100Z","updated_at":"2025-10-25T07:26:12.385Z","avatar_url":"https://github.com/wangdahoo.png","language":"JavaScript","funding_links":[],"categories":["Front-End Development","UI组件","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["[Vue.js](https://github.com/vuejs/awesome-vue)","Component Collections","无限滚动","UI Components","Infinite Scroll"],"readme":"# Vue Scroller ![version](https://img.shields.io/badge/version-%20v2.2.0%20-green.svg) ![vue](https://img.shields.io/badge/vue-%20v2.1%20-green.svg) \n\n[Vue Scroller](https://github.com/wangdahoo/vue-scroller) is a foundational component of [Vonic](https://github.com/wangdahoo/vonic) UI.\nIn purpose of smooth scrolling, pull to refresh and infinite loading.\n\n\u003e For vue 1.0, please refer to branch v1.\n\n## Demo\n\n[https://wangdahoo.github.io/vue-scroller/](https://wangdahoo.github.io/vue-scroller/)\n\n## How to use\n\n```bash\nnpm i vue-scroller -S\n```\n\n```js\n/* ignore this if you include vue-scroller.js by \u003cscript\u003e tag from a cdn, such as unpkg */\nimport Vue from 'vue'\nimport VueScroller from 'vue-scroller'\nVue.use(VueScroller)\n```\n\n```html\n\u003cscroller \n  :on-refresh=\"refresh\"\n  :on-infinite=\"infinite\"\u003e\n  \u003c!-- content goes here --\u003e\n\u003c/scroller\u003e\n```\n\n[Live Code on JsFiddle](https://jsfiddle.net/wangdahoo/cpjfr096/)\n\n## Webpack project by vue-cli\n\nhttps://github.com/wangdahoo/vue-scroller-demo\n\n## API\n\n#### Scroller component attributes:\n\n| Attr. Name | Description | Required | Default Value |\n|-----|-----|-----|-----|\n| onRefresh | pull to refresh callback | N | - |\n| onInfinite | infinite loading callback | N | - |\n| refreshText | tips of `pull-to-refresh` | N | 下拉刷新 |\n| noDataText | tips of `no-more-data` when `infinite-loading` finished | N | 没有更多数据 |\n| width | scroller container width | N | `100%` |\n| height | scroller container height | N | `100%` |\n| snapping | enable snapping mode | N | `false` |\n| snappingWidth | snapping width | N | 100 (stand for 100px) |\n| snappingHeight | snapping height | N | 100 |\n| refreshLayerColor | text color of `pull-to-refresh` layer | N | #AAA |\n| loadingLayerColor | text color of `infinite-loading` layer | N | #AAA |\n| minContentHeight | min content height (px) of `scroll-content` | N | 0 |\n\n#### Scroller vm instance methods:\n\n- `resize()` resize scroller content (**deprecated, cause the scroller's content resizes self automatically**)\n- `triggerPullToRefresh()` start pull-to-refresh manually\n- `finishPullToRefresh()` stop pull-to-refresh\n- `finishInfinite(isNoMoreData :Boolean)` stop infinite-loading\n- `scrollTo(x:Integer, y:Integer, animate:Boolean)` scroll to a position in scroller content\n- `scrollBy(x:Integer, y:Integer, animate:Boolean)` scroll by a position in scroller content\n- `getPosition :Object` get current position of scroller content\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangdahoo%2Fvue-scroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangdahoo%2Fvue-scroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangdahoo%2Fvue-scroller/lists"}