{"id":13424078,"url":"https://github.com/Teddy-Zhu/vue-smoothscroll","last_synced_at":"2025-03-15T18:33:48.016Z","repository":{"id":65412456,"uuid":"58705984","full_name":"Teddy-Zhu/vue-smoothscroll","owner":"Teddy-Zhu","description":"a vue version smoothscroll for website","archived":true,"fork":false,"pushed_at":"2018-07-09T00:36:14.000Z","size":522,"stargazers_count":60,"open_issues_count":2,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-21T08:58:23.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Teddy-Zhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-13T06:10:11.000Z","updated_at":"2023-01-28T18:37:03.000Z","dependencies_parsed_at":"2023-01-22T08:05:38.108Z","dependency_job_id":null,"html_url":"https://github.com/Teddy-Zhu/vue-smoothscroll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-Zhu%2Fvue-smoothscroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-Zhu%2Fvue-smoothscroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-Zhu%2Fvue-smoothscroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddy-Zhu%2Fvue-smoothscroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Teddy-Zhu","download_url":"https://codeload.github.com/Teddy-Zhu/vue-smoothscroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221601253,"owners_count":16850309,"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":[],"created_at":"2024-07-31T00:00:48.128Z","updated_at":"2024-10-26T23:30:13.422Z","avatar_url":"https://github.com/Teddy-Zhu.png","language":"JavaScript","funding_links":[],"categories":["Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","UI组件","Awesome Vue.js"],"sub_categories":["Libraries \u0026 Plugins"],"readme":"# vue-smoothscroll\n\n\u003e it\u0026#x27;s a vuejs version of smoothscroll Based on https://github.com/alicelieutier/smoothScroll/blob/master/smoothscroll.js\n\n## How to Use\n\n``` bash\n# install dependencies\nnpm install vue-smoothscroll\n```\nthen in the js file , you can use with router or others\n``` javascript\nvar vueSmoothScroll = require('vue-smoothscroll');\nVue.use(vueSmoothScroll);\n\n```\n\n```html\n   //define a tag\n   \u003cdiv v-smoothscroll=\"{ duration : 500, callback: callback , context : undefined , axis :'y' }\" class=\"message\"\u003e\n       message\n   \u003c/div\u003e\n```\n\nor\n\n```javascript\n    this.$SmoothScroll(target,duration,callback,context，axis);\n```\nparams\n* `target` is a `HTMLElement Object` from your document that you want to scroll to, or a numeric position on the page\n* `duration` is the total duration of the scroll (optional, defaults to 500ms)\n* `callback` is a function to be executed when the scrolling is over (optional)\n* `context` is the scrolling context (optional, defaults to window, can be any `HTMLElement Object`)\n* `axis` is the x,y axis ,the value can be 'y' , 'x' , 'both', 'y' means horizontal direction, 'x' means vertical direction","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTeddy-Zhu%2Fvue-smoothscroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTeddy-Zhu%2Fvue-smoothscroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTeddy-Zhu%2Fvue-smoothscroll/lists"}