{"id":13600061,"url":"https://github.com/BiLiangLtd/WxSacnProgressBar","last_synced_at":"2025-04-10T21:31:09.965Z","repository":{"id":201750895,"uuid":"108085235","full_name":"BiLiangLtd/WxSacnProgressBar","owner":"BiLiangLtd","description":"微信小程序自定义扫描进度动画组件","archived":false,"fork":false,"pushed_at":"2017-11-13T06:52:01.000Z","size":2005,"stargazers_count":57,"open_issues_count":1,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-07T02:36:29.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BiLiangLtd.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}},"created_at":"2017-10-24T06:19:43.000Z","updated_at":"2023-12-26T15:22:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"59076df5-b28e-420c-b81a-a359e610e765","html_url":"https://github.com/BiLiangLtd/WxSacnProgressBar","commit_stats":null,"previous_names":["biliangltd/wxsacnprogressbar"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiLiangLtd%2FWxSacnProgressBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiLiangLtd%2FWxSacnProgressBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiLiangLtd%2FWxSacnProgressBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiLiangLtd%2FWxSacnProgressBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BiLiangLtd","download_url":"https://codeload.github.com/BiLiangLtd/WxSacnProgressBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248301352,"owners_count":21080876,"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-08-01T18:00:20.860Z","updated_at":"2025-04-10T21:31:09.417Z","avatar_url":"https://github.com/BiLiangLtd.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"## WxSacnProgressBar\n用于微信小程序的一个圆形进度组件，支持自定义循环播放图标。\n\n## 效果图\n![image](https://github.com/BiLiangLtd/WxSacnProgressBar/raw/master/demo_images/ScanBar.png)\n![image](https://github.com/BiLiangLtd/WxSacnProgressBar/raw/master/demo_images/ScanAnimation.gif)\n  \n## 如何使用\n### 整个项目可以直接作为小程序项目导入到微信开发者工具中运行，biliang目录为组件库目录。\n1. 把clone下来中的项目中的 **biliang** 目录，拷贝到 **小程序项目的根目录**  \n2. 在你的页面级别中(pages/xxx)，导入使用，具体如下：  \n\t**1）在wxss中导入样式**  \n\t\n\t```javascript\n\t@import \"../../biliang/scan/scanbar.wxss\";\n\t```\n\t  \n\t**2)在wxml中导入模板，并指定template，is和data请都不要修改，组件会自动调用**  \n\t\n\t```xml\n\t\u003cimport src=\"../../biliang/scan/scanbar.wxml\"/\u003e\n\t\u003cview class=\"container\"\u003e\n\t\t\u003ctemplate is=\"scanbar\" data=\"{{...scanbar}}\"/\u003e\n\t\u003c/view\u003e\n\t```\n\t  \n\t**3）在页面js中导入**  \n\t\n\t```javascript\n\tvar ScanBar = require(\"../../biliang/scan/scanbar.js\")\n\t```\n\t  \n\t**4）在页面js中，调用ScanBar中提供的方法，即可实现效果**  \n\t\n\t```javascript\n\tonLoad: function () {\n\t\t//1、创建对象\n    \tthis.scanBar = new ScanBar();\n    \t//2、传入需要展示的图标\n    \tthis.scanBar.init(['../../images/icon_toutiao.svg', '../../images/icon_weibo.svg', '../../images/icon_sohu.svg']);\n\t},\n\tonShow: function () {\n    \t//3、开始扫描\n    \tthis.scanBar.startScan();\n    \t//4、设置进度\n    \tthis.scanBar.setProgress(progress);\n    },\n    onHide: function () {\n    \t//5、调用该方法可停止扫描，进度达到100%之后，请手动调用，页面关闭时也请手动调用\n    \tthis.scanBar.stopScan(true);\n    }\n\t```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBiLiangLtd%2FWxSacnProgressBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBiLiangLtd%2FWxSacnProgressBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBiLiangLtd%2FWxSacnProgressBar/lists"}