{"id":22022593,"url":"https://github.com/lfyfly/vue-scroll-response","last_synced_at":"2026-05-05T02:36:42.941Z","repository":{"id":57396604,"uuid":"86822062","full_name":"lfyfly/vue-scroll-response","owner":"lfyfly","description":"滚动内容区，目录区会同时响应，对应可视区内容的目录区会显示激活样式。Scroll the content area, directory will response at the same time, the corresponding visual area content directory area will display the activation style.","archived":false,"fork":false,"pushed_at":"2017-06-30T11:28:49.000Z","size":234,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T16:49:37.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"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/lfyfly.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":"2017-03-31T13:28:14.000Z","updated_at":"2021-08-10T03:15:24.000Z","dependencies_parsed_at":"2022-08-27T14:36:00.925Z","dependency_job_id":null,"html_url":"https://github.com/lfyfly/vue-scroll-response","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/lfyfly%2Fvue-scroll-response","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfyfly%2Fvue-scroll-response/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfyfly%2Fvue-scroll-response/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfyfly%2Fvue-scroll-response/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfyfly","download_url":"https://codeload.github.com/lfyfly/vue-scroll-response/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245087414,"owners_count":20558767,"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-11-30T06:21:53.102Z","updated_at":"2026-05-05T02:36:37.916Z","avatar_url":"https://github.com/lfyfly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## vue-scroll-response 解决了什么问题\n\u003e vue2.x 指令\n- 滚动内容区，目录区会同时响应，当前可视区的目录可以添加激活样式\n- 目录区激活样式可能不在可视区，赋予自动调整到可视区功能\n\n\n## [DEMO](https://lfyfly.github.io/vue-scroll-response/)\n\n## [GITHUB](https://github.com/lfyfly/vue-scroll-response)\n\n## 安装\n```\nnpm install --save-dev vue-scroll-response\n```\n## 引用\n\n```js\nimport scrollResponse from 'vue-scroll-response'\nVue.use(scrollResponse)\n```\n\n## 前提（重要）\n目录容器中的标题和内容容器中的标题要形成一一对应，并且都带有**一致的类名**(详情见src/components/test.vue)\n\n## 使用\n```html\n\u003ctest v-scroll-response=\"{title:'title',contentId:'content',catalogId:'catalog'}\"\u003e\u003c/test\u003e\n```\n### 如果不想要内容区的目录呈现激活样式,设置contentTitleActive为off\n```html\n\u003ctest v-scroll-response=\"{contentTitleActive:'off',title:'.title',contentId:'content',catalogId:'catalog'}\"\u003e\u003c/test\u003e\n```\n## 参数详解\n参数 | header 2\n---|---\ntitle | 目录容器中的标题和内容容器中的标题的统一类名\ncontentId | 内容容器id，是添加scroll事件的元素\ncatalogId | 目录容器id，是添加scroll事件的元素\ncontentTitleActive | 当设置为'off'时，内容区的标题不会有激活样式\n\n## 自定义激活样式（**需要自己手动添加**）\n```css\n.catalog-active\u003ea {\n  color: red!important;\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfyfly%2Fvue-scroll-response","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfyfly%2Fvue-scroll-response","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfyfly%2Fvue-scroll-response/lists"}