{"id":20628400,"url":"https://github.com/wuxianqiang/v-back","last_synced_at":"2026-04-22T06:03:19.580Z","repository":{"id":57389617,"uuid":"184349160","full_name":"wuxianqiang/v-back","owner":"wuxianqiang","description":"back to the top","archived":false,"fork":false,"pushed_at":"2019-05-03T07:50:57.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-21T14:59:42.796Z","etag":null,"topics":["backtop","directive","vue"],"latest_commit_sha":null,"homepage":"","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/wuxianqiang.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":"2019-05-01T00:23:12.000Z","updated_at":"2019-05-03T07:50:59.000Z","dependencies_parsed_at":"2022-09-19T01:31:41.732Z","dependency_job_id":null,"html_url":"https://github.com/wuxianqiang/v-back","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wuxianqiang/v-back","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuxianqiang%2Fv-back","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuxianqiang%2Fv-back/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuxianqiang%2Fv-back/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuxianqiang%2Fv-back/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wuxianqiang","download_url":"https://codeload.github.com/wuxianqiang/v-back/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuxianqiang%2Fv-back/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32123604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backtop","directive","vue"],"created_at":"2024-11-16T13:20:07.236Z","updated_at":"2026-04-22T06:03:19.564Z","avatar_url":"https://github.com/wuxianqiang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# v-back\r\n\r\nback to the top\r\n\r\n# Installation\r\n\r\n## npm\r\n\r\n```bash\r\n\r\n$ npm i v-back -S\r\n\r\n```\r\n\r\n# Usage\r\n\r\nmain.js:\r\n\r\n```javascript\r\n\r\nimport Vue from 'vue'\r\nimport App from './App.vue'\r\nimport VBack from 'v-back'\r\n\r\nVue.use(VBack)\r\n\r\n// or with options\r\nVue.use(VBack, {\r\n  el: '#wrapper',\r\n  duration: 300\r\n})\r\n\r\nnew Vue({\r\n  el: 'body',\r\n  components: {\r\n    App\r\n  }\r\n})\r\n```\r\n\r\ntemplate:\r\n\r\n```html\r\n\u003cspan v-back=\"50\"\u003e\r\n  top\r\n\u003c/span\u003e\r\n```\r\n\u003e Scroll to the top 50\r\n\r\nuse `v-back` in the container\r\n\r\n```\r\nVue.use(VBack, {\r\n  el: '#wrapper',\r\n  duration: 300,\r\n  distance: '50px'\r\n})\r\n```\r\n\r\n## Constructor Options\r\n|key|description|default|options|\r\n|:---|---|---|---|\r\n| `el`|scroll container|`window`|`String`|\r\n|`duration`|Rolling time|`300`|`Number`|\r\n|`distance`|When does the scrolling element appear?|Always appear|`String`|\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuxianqiang%2Fv-back","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwuxianqiang%2Fv-back","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuxianqiang%2Fv-back/lists"}