{"id":21712227,"url":"https://github.com/wunci/swipe","last_synced_at":"2025-03-20T18:23:17.436Z","repository":{"id":144078774,"uuid":"137764550","full_name":"wunci/Swipe","owner":"wunci","description":"Swipe is touch slider","archived":false,"fork":false,"pushed_at":"2018-06-28T03:34:37.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T17:11:18.378Z","etag":null,"topics":["slider","slider-plugin","swipe"],"latest_commit_sha":null,"homepage":"http://www.wclimb.site/swipe/","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/wunci.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-18T14:44:02.000Z","updated_at":"2018-06-28T03:34:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4b1ce48-1f99-4f88-b612-125210f16514","html_url":"https://github.com/wunci/Swipe","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/wunci%2FSwipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FSwipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FSwipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FSwipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wunci","download_url":"https://codeload.github.com/wunci/Swipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244667459,"owners_count":20490435,"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":["slider","slider-plugin","swipe"],"created_at":"2024-11-25T23:35:50.502Z","updated_at":"2025-03-20T18:23:17.428Z","avatar_url":"https://github.com/wunci.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swipe\nSwiper is touch slider\n\n[在线预览](http://www.wclimb.site/swipe/)\n\n暂时可配置列表（可扩展实现常见的大部分功能）\n1. 分页\n2. 分页是否可点击\n3. 自动轮播（设置时间）\n4. 上一页下一页\n5. 监听动画结束\n6. 设置开始位置（从1开始）\n7. 设置过渡时间\n\n# 例子\nhtml\n\n\u003e css自行引入\n\n```html\n    \u003cdiv class=\"main\"\u003e\n        \u003cdiv class=\"swipe-wrap\"\u003e\n            \u003cdiv class=\"swipe-slide slide1\"\u003e\n                slide1\n            \u003c/div\u003e\n            \u003cdiv class=\"swipe-slide slide2\"\u003e\n                slide2\n            \u003c/div\u003e\n            \u003cdiv class=\"swipe-slide slide3\"\u003e\n                slide3\n            \u003c/div\u003e\n            \u003cdiv class=\"swipe-slide slide4\"\u003e\n                slide4\n            \u003c/div\u003e\n        \u003c/div\u003e\n        \u003cdiv class=\"pagination\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"swipe-btn-prev\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"swipe-btn-next\"\u003e\u003c/div\u003e\n    \u003c/div\u003e\n```\njs\n```js\nvar swiper = new Swipe('.main',{\n        startSlide: 1, // 开始位置从1开始\n        speed: 500, // 过渡时间\n        pagination:{\n            el: '.pagination',// 分页元素\n            clickAble: true // 分页可点击\n        },\n        autoplay: 3000,// 设置自动轮播\n        navigation:{\n            next:'.swipe-btn-next', // 前进\n            prev:'.swipe-btn-prev', // 后退\n        },\n        // 动画结束回调\n        transitionEnd:function(swipe){\n            console.log('realIndex',swipe.realIndex)\n        },\n    })\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwunci%2Fswipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwunci%2Fswipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwunci%2Fswipe/lists"}