{"id":13701361,"url":"https://github.com/STUkh/vue-promise-btn","last_synced_at":"2025-05-04T21:30:49.885Z","repository":{"id":30618158,"uuid":"125527403","full_name":"STUkh/vue-promise-btn","owner":"STUkh","description":"Vue.js plugin that handles buttons async lock state. Demo: https://stukh.github.io/vue-promise-btn/","archived":false,"fork":false,"pushed_at":"2022-12-29T10:38:25.000Z","size":4121,"stargazers_count":172,"open_issues_count":10,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-22T01:19:45.664Z","etag":null,"topics":["promise-btn","spinner","vue","vue-promise-btn"],"latest_commit_sha":null,"homepage":"","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/STUkh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-16T14:29:28.000Z","updated_at":"2025-02-28T03:02:31.000Z","dependencies_parsed_at":"2023-01-14T17:20:01.970Z","dependency_job_id":null,"html_url":"https://github.com/STUkh/vue-promise-btn","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/STUkh%2Fvue-promise-btn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STUkh%2Fvue-promise-btn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STUkh%2Fvue-promise-btn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STUkh%2Fvue-promise-btn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/STUkh","download_url":"https://codeload.github.com/STUkh/vue-promise-btn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252403736,"owners_count":21742428,"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":["promise-btn","spinner","vue","vue-promise-btn"],"created_at":"2024-08-02T20:01:32.819Z","updated_at":"2025-05-04T21:30:47.733Z","avatar_url":"https://github.com/STUkh.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","HTML","UI组件","Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["装载机","UI Components","Loader"],"readme":"# vue-promise-btn\n\n[![NPM Version](http://img.shields.io/npm/v/vue-promise-btn.svg?style=flat-square)](https://www.npmjs.com/package/vue-promise-btn)\n[![Download Month](http://img.shields.io/npm/dm/vue-promise-btn.svg?style=flat-square)](https://www.npmjs.com/package/vue-promise-btn)\n\n## Example and Documentation\nhttps://STUkh.github.io/vue-promise-btn/\n\n\u003cdiv style=\"text-align:center\" align=\"center\"\u003e\n    \u003cimg src=\"example/example.gif\" alt=\"vue-promise-btn\"\u003e\n\u003c/div\u003e\n\n## Features\n- Easy-to-use API\n- Flexible Usage\n- Works with any tag and even forms\n- In Extended Mode - compatible with 3rd party components\n- Packaged with optional built-in spinner\n- Only 1.5KB minified and gzipped\n- ESM, CommonJS, UMD versions\n\n### Installation\n```\nnpm install --save vue-promise-btn\n```\n#### Quick Start:\n- Import and \"handshake\" plugin with vue\n```javascript\nimport Vue from 'vue'\nimport VuePromiseBtn from 'vue-promise-btn'\n\n// not required. Styles for built-in spinner\nimport 'vue-promise-btn/dist/vue-promise-btn.css'\n\nVue.use(VuePromiseBtn) // or with global options Vue.use(VuePromiseBtn, {})\n```\n\n- Simple usage:\n``` \u003cbutton v-promise-btn @click=\"getData\"\u003eGet Data\u003c/button\u003e ```\n- Extended usage: ``` \u003cbutton v-promise-btn={ promise: dataPromise } @click=\"getData('param')\"\u003eGet Data\u003c/button\u003e ```\n\n#### If you face any issue with simple mode, just try out extended, it's more reliable way.\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Important Notice\n\nAlways return Promise from expression. Especially in simple mode.\n\nDon't use semicolon in event expressions. It may break promise return in template-compiler: \u003cbr\u003e\nGood: `@click=\"handler($event)\"` \u003cbr\u003e\nBad: `@click=\"handler($event);\"`\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## Credits\n\n- [Alex Stepchenkov](https://github.com/STUkh)\n- [All Contributors](https://github.com/STUkh/vue-promise-btn/graphs/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n\u0026copy; [STUkh](https://github.com/STUkh) \u003cstukak@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSTUkh%2Fvue-promise-btn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSTUkh%2Fvue-promise-btn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSTUkh%2Fvue-promise-btn/lists"}