{"id":27995549,"url":"https://github.com/chokcoco/iswiper","last_synced_at":"2025-05-08T20:33:23.874Z","repository":{"id":57299498,"uuid":"70050019","full_name":"chokcoco/iswiper","owner":"chokcoco","description":"一款小而美的轻量级、高性能移动端滑动插件。","archived":false,"fork":false,"pushed_at":"2017-04-13T16:12:50.000Z","size":42,"stargazers_count":18,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-20T02:34:35.193Z","etag":null,"topics":["swiper"],"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/chokcoco.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-10-05T10:22:43.000Z","updated_at":"2022-10-18T06:25:00.000Z","dependencies_parsed_at":"2022-08-26T18:21:58.153Z","dependency_job_id":null,"html_url":"https://github.com/chokcoco/iswiper","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/chokcoco%2Fiswiper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chokcoco%2Fiswiper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chokcoco%2Fiswiper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chokcoco%2Fiswiper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chokcoco","download_url":"https://codeload.github.com/chokcoco/iswiper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253145296,"owners_count":21861220,"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":["swiper"],"created_at":"2025-05-08T20:33:16.857Z","updated_at":"2025-05-08T20:33:23.771Z","avatar_url":"https://github.com/chokcoco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![npm_version](https://img.shields.io/npm/v/mobile_iswiper.svg)[![Travis](https://img.shields.io/travis/rust-lang/rust.svg)](https://github.com/chokcoco/iswiper)![License](https://img.shields.io/npm/l/express.svg)\n\n# iswiper\n\n一款小而美的轻量级、高性能移动端滑动插件。\n\n保留最基本的功能，提供最大限度的拓展。\n\n## Features\n\n- 支持横屏、竖屏滚动\n- 支持无限轮播\n- 支持手势滑动\n- 支持进度条\n\n## Build\n\n使用 Gulp 构建，可查看完整 Demo。安装包：\n\n```\n$ npm install mobile_iswiper\n```\n\n运行：\n\n```\n$ npm start\n```\n\n## Use\n\n引入 `iswiper.css` 及 `iswiper.js` 。支持 AMD 、CMD 规范。\n\n```html\n\u003cdiv class=\"container\"\u003e\n  \u003c!-- 滑动结构 --\u003e\n  \u003cdiv class=\"swiper\"\u003e\n    \u003cdiv class=\"item\"\u003e\n        \u003c!--内部结构--\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"item\"\u003e\n        \u003c!--内部结构--\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"item\"\u003e\n        \u003c!--内部结构--\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"item\"\u003e\n        \u003c!--内部结构--\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003c!-- 进度条结构，可选 --\u003e\n  \u003cdiv class=\"progress-bar\"\u003e\n    \u003ci\u003e\u003c/i\u003e\n    \u003ci\u003e\u003c/i\u003e\n    \u003ci\u003e\u003c/i\u003e\n    \u003ci\u003e\u003c/i\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n\u003cscript\u003e\n  var swiper = new Swiper();\n\u003c/script\u003e\n```\n\n## API\n```javascript\nvar swiper = new Swiper({\n  // 容器\n  container: '.swiper',\n  // 每页 className\n  item: '.item',\n  // 默认竖屏，可选横屏 horizontal\n  direction: 'vertical',\n  // 激活态 className\n  activeClass: 'active',\n  // 默认不无限首尾相连\n  infinite: false,\n  // 滑动切换距离阀值\n  threshold: 30,\n  // 切换动画时间\n  duration: 600,\n  // 自动切换，默认为 false，自动切换必须 infinite:true\n  autoSwitch: false,\n  // 切换间隔\n  loopTime: 5000,\n  // 切换缓动函数，默认为 linear，可传入 cubic-bezier()\n  easing: \"linear\",\n  // 进度条，默认没有进度条，可选 true 且需要加上进度条 html 代码\n  progressBar:false\n});\n```\n\n- `next`: 滑动到到下一屏\n\n```javascript\n    var swiper = new Swiper();\n    swiper.next();\n```\n\n- `go`: 主动滑动到指定界面。\n\n```javascript\n    var swiper = new Swiper();\n    swiper.go(1);\n```\n\n- `resetLoop`: 重置滚动轮播\n\n```javascript\n    var swiper = new Swiper();\n    swiper.resetLoop();\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchokcoco%2Fiswiper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchokcoco%2Fiswiper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchokcoco%2Fiswiper/lists"}