{"id":15098186,"url":"https://github.com/zwq8299174/ionic-alpha-scroll","last_synced_at":"2025-04-15T00:31:32.584Z","repository":{"id":57275893,"uuid":"107215263","full_name":"zwq8299174/ionic-alpha-scroll","owner":"zwq8299174","description":"一款基于ionic的索引列表插件，类似于原生APP的通讯录页面、微信的联系人页面、汽车之家的汽车品牌页面等等，首字母进行索引然后滑动。","archived":false,"fork":false,"pushed_at":"2019-05-13T12:43:13.000Z","size":3895,"stargazers_count":11,"open_issues_count":5,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T13:42:24.129Z","etag":null,"topics":["a-z","alpha-scroll","ionic","ionic-alpha-scroll","ionic3"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/zwq8299174.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-10-17T03:52:46.000Z","updated_at":"2022-02-19T01:56:34.000Z","dependencies_parsed_at":"2022-08-25T01:14:11.295Z","dependency_job_id":null,"html_url":"https://github.com/zwq8299174/ionic-alpha-scroll","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwq8299174%2Fionic-alpha-scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwq8299174%2Fionic-alpha-scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwq8299174%2Fionic-alpha-scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwq8299174%2Fionic-alpha-scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zwq8299174","download_url":"https://codeload.github.com/zwq8299174/ionic-alpha-scroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248984279,"owners_count":21193717,"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":["a-z","alpha-scroll","ionic","ionic-alpha-scroll","ionic3"],"created_at":"2024-09-25T16:44:12.607Z","updated_at":"2025-04-15T00:31:31.687Z","avatar_url":"https://github.com/zwq8299174.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ionic-alpha-scroll\n\t一款基于ionic的索引列表插件，类似于原生APP的通讯录页面、微信的联系人页面、汽车之家的汽车品牌页面等等，首字母进行索引然后滑动。\n\n\t一个耿直的程序猿因为业务需要，需要做一个类似原生应用联系人页面的索引列表功能。在网上找了许久许久，包括github和其他网站，虽然有类似的，但是不是闪屏就是卡顿还有抖动，都无法满足程序猿的需要，所以他决定自己写一个插件，然后就是`ionic-alpha-scroll`这个插件了。\n\n\t丝般顺滑的滑动，不卡顿、不闪屏、不抖动，接近原生的滚动体验。\n\n#更新：\n\n### 20171103\n1、新增自定义头部模板功能。感谢[@Yan Xiaodi](https://github.com/yanxiaodi)\n\n# DEMO\n[DEMO](http://zwq8299174.github.io/ionic-alpha-scroll/)\n源码地址：[https://github.com/zwq8299174/ionic-alpha-scroll-demo](https://github.com/zwq8299174/ionic-alpha-scroll-demo)\n\n![Animated demo](https://github.com/zwq8299174/ionic-alpha-scroll/blob/master/Screenshot.gif)\n\n\n# 安装\n### 1、使用`npm`安装\n\u003e npm install ionic-alpha-scroll --save\n### 2、在`app.module.ts`中引入\n```typescript\nimport { AlphaScrollModule } from 'ionic-alpha-scroll';\n @NgModule({\n\t ...\n\t imports: [\n\t\t...\n\t\tAlphaScrollModule.forRoot(),\n\t\t...\n\t]\n})\n```\n# 使用\n### 1、在页面中引入\n```html\n\u003cion-alpha-scroll *ngIf=\"contacts.length\u003e0\"\n\t[listData]=\"contacts\"\n\tkey=\"name\"\n\t[itemTemplate]=\"alphaScrollItemTemplate\"\n\t[currentPageClass]=\"currentPageClass\"\u003e\n\u003c/ion-alpha-scroll\u003e\n\u003cng-template\n\t#alphaScrollItemTemplate\n\tlet-item=\"item\"\n\tlet-currentPageClass=\"currentPageClass\"\u003e\n\t\u003cion-item (click)=\"currentPageClass.onItemClick(item)\"\u003e\n\t\t\u003ch2\u003e{{item?.name}}\u003c/h2\u003e\n\t\u003c/ion-item\u003e\n\u003c/ng-template\u003e\n```\n\n### 2、数据格式\n数据格式要求为数组类型，元素为对象或数组都可以，最好是对象格式。需要包含当前元素的首字母，本插件没有提取首字母功能。比如汽车品牌列表，单个品牌对象如下\n```javascript\n{\n\tid:\"1\",\n\tinitial:\"A\",\n\tlogo:\"http://api.jisuapi.com/car/static/images/logo/300/1.png\",\n\tname:\"奥迪\",\n\tparentid:\"0\"\n}\n```\n其中`initial`为首字母的字段。\n\n# Api\n### listData\n列表数据，格式为Array，数组元素为对象。\n### key\n列表元素首字母字段的名字\n### itemTemplate\n列表元素所使用的模板，需结合页面上`ng-template`所使用。\n### currentPageClass\n当前使用索引列表的页面主体`class`类\n\n\n# License\nThis content is released under the [MIT](https://opensource.org/licenses/MIT) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwq8299174%2Fionic-alpha-scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzwq8299174%2Fionic-alpha-scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwq8299174%2Fionic-alpha-scroll/lists"}