{"id":19495426,"url":"https://github.com/nu-system/vue-button","last_synced_at":"2026-03-01T08:36:19.750Z","repository":{"id":57093876,"uuid":"193636171","full_name":"nu-system/vue-button","owner":"nu-system","description":"NU 「 no-ui 」 组件库系统 nu-system，按钮组件 VUE 实现","archived":false,"fork":false,"pushed_at":"2019-08-20T09:16:52.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T17:55:56.742Z","etag":null,"topics":["button","button-vue","ui-components","vue-button","vue-components"],"latest_commit_sha":null,"homepage":"https://nu-system.github.io/vue/button/","language":"Vue","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/nu-system.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-06-25T04:45:47.000Z","updated_at":"2019-08-20T09:16:54.000Z","dependencies_parsed_at":"2022-08-22T21:40:36.593Z","dependency_job_id":null,"html_url":"https://github.com/nu-system/vue-button","commit_stats":null,"previous_names":["nu-system/button-vue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nu-system/vue-button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu-system%2Fvue-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu-system%2Fvue-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu-system%2Fvue-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu-system%2Fvue-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nu-system","download_url":"https://codeload.github.com/nu-system/vue-button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu-system%2Fvue-button/sbom","scorecard":{"id":697934,"data":{"date":"2025-08-11","repo":{"name":"github.com/nu-system/vue-button","commit":"f30fb8da002f812774d3baa2cc7771a06ae78ea1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T04:15:25.735Z","repository_id":57093876,"created_at":"2025-08-22T04:15:25.735Z","updated_at":"2025-08-22T04:15:25.735Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29965412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["button","button-vue","ui-components","vue-button","vue-components"],"created_at":"2024-11-10T21:37:43.172Z","updated_at":"2026-03-01T08:36:19.652Z","avatar_url":"https://github.com/nu-system.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Button\n\n[![npm package](https://img.shields.io/npm/v/@_nu/vue-button.svg)](https://www.npmjs.org/package/@_nu/vue-button)\n[![github](https://img.shields.io/github/stars/nu-system/vue-button.svg?style=social)](https://github.com/nu-system/vue-button)\n\n\u003cClientOnly\u003e\n\u003cButtonDemo/\u003e\n\u003c/ClientOnly\u003e\n\n组件库母版系统 [NU-system](https://nu-system.github.io/) 按钮组件 VUE 实现。\n\n## 怎么用?\n\n```bash\n$ yarn add @_nu/vue-button @_nu/css-button\n```\n\n### 二次封装\n\n```vue  \n\u003cscript\u003e\n  import NuButton from \"@_nu/vue-button\";\n  import \"@_nu/css-button\";\n  import \"@_nu/css-button/css/skins/loading.css\";\n  import \"@_nu/css-button/css/skins/bootstrap.css\";\n\n  export default {\n    props: {\n      // 设置默认颜色\n      color: {\n        default: 'primary'\n      },\n      // 设置默认变体\n      variant: {\n        default: 'ghost'\n      },\n    },\n    mixins: [NuButton]\n  };\n\u003c/script\u003e\n\n\u003cstyle\u003e\n  .nu_btn{\n    /** 自定义样式 */\n  }\n\u003c/style\u003e\n```\n\n设置默认「 颜色 」和「 变体 」的目的是避免每次在使用按钮的时候需要添加对应属性。\n\n因为 `NuButton` 是纯逻辑组件本身不会输出任何样式，在实际项目中使用需要二次封装。\n这里采用的是 [nu-button](https://nu-system.github.io/css/button/) 里面的 bootstrap 皮肤。\n\n### 使用\n\n```vue  \n\u003ctemplate\u003e\n    \u003cdiv\u003e\n      \u003cButton\u003e按钮\u003c/Button\u003e\n    \u003c/div\u003e  \n\u003c/template\u003e\n\n\u003cscript\u003e\n    import Button from \"@components/Button\";\n    export default {\n        components: {\n            Button\n        }\n    }\n\u003c/script\u003e\n```\n\n## DOM 结构\n\n```VUE\n\u003cButton\u003ehello\u003c/Button\u003e\n\u003cButton href=\".\" title=\"hello\"\u003ehello\u003c/Button\u003e\n```\n\n上面的代码会被渲染成如下的 HTML 结构。\n\n```HTML\n\u003cbutton class=\"nu_button\" type=\"button\" \u003e\u003cspan\u003ehello\u003c/span\u003e\u003c/button\u003e\n\u003ca class=\"nu_button\" href=\".\" title=\"hello\"\u003e\u003cspan\u003ehello\u003c/span\u003e\u003c/a\u003e\n```\n\n## API\n\n| props   | 类型 | 默认值 | 功能 | DEMO |\n|:-----|:-----:|:-----:|:-----:|:-----:|\n| baseClass |  string | 'nu_btn' | 默认选择器 | - |\n| type |  string | 'button' | 按钮类型 | \u003cClientOnly\u003e\u003cButton type=\"submit\"\u003eSubmit\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| href |  string | - | 跳转链接|\u003cClientOnly\u003e\u003cButton href=\".\"\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| color| 'default' \u0026#124; 'primary' \u0026#124; 'secondary' \u0026#124; \u003cbr/\u003e 'success' \u0026#124; 'warning' \u0026#124; 'danger' |  'default' | 按钮颜色 | \u003cClientOnly\u003e\u003cButton\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| primary |  boolean | - | 主按钮 | \u003cClientOnly\u003e\u003cButton primary\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| secondary |  boolean | - | 次级按钮 | \u003cClientOnly\u003e\u003cButton secondary\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| warning |  boolean | - | 警告按钮 | \u003cClientOnly\u003e\u003cButton warning\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| success |  boolean | - | 成功按钮 | \u003cClientOnly\u003e\u003cButton success\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| danger |  boolean | - | 危险按钮 | \u003cClientOnly\u003e\u003cButton danger\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| variant| 'fill' \u0026#124; 'ghost' \u0026#124; 'link' | 'fill' | 按钮变体 | \u003cClientOnly\u003e\u003cButton\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| fill | boolean | - | 实心按钮 | \u003cClientOnly\u003e\u003cButton\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| ghost |  boolean | - | 幽灵按钮 | \u003cClientOnly\u003e\u003cButton ghost\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| link |  boolean | - | 链接按钮 | \u003cClientOnly\u003e\u003cButton link\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| large |  boolean | - | 大按钮 | \u003cClientOnly\u003e\u003cButton large\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| middle |  boolean | - | 中号按钮 | \u003cClientOnly\u003e\u003cButton middle\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| small |  boolean | - | 小按钮 | \u003cClientOnly\u003e\u003cButton small\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| disabled |  boolean | - | 不可用按钮|\u003cClientOnly\u003e\u003cButton disabled\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| loading |  boolean | - | loading按钮|\u003cClientOnly\u003e\u003cButton loading\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| capsule |  boolean | - | 圆角按钮|\u003cClientOnly\u003e\u003cButton capsule\u003e按钮\u003c/Button\u003e\u003c/ClientOnly\u003e |\n| block |  boolean | - | 占一行的按钮| 见下面demo |\n\n\u003cClientOnly\u003e\n\u003cButton block\u003e block 按钮\u003c/Button\u003e\n\u003c/ClientOnly\u003e\n\n并且除了上表中的属性，其它属性都会直接传到原生 button 上。\n\n## 如何修改样式？\n\nnu-button-vue 会将上所有的 `boolean` 属性，基于以下的 「 class 映射表 」添加对应的 class 到按钮上。想要自定义样式，只需要围绕对应选择器进行开发即可, 样式定义规则可以查看 [nu-button](https://yued-fe.github.io/nu-system/packages/button/)。\n\n| props |  class |\n|:----------|------:|\n| baseClass | .nu_btn |\n| primary | ._primary |\n| secondary | ._secondary |\n| warning | ._warning |\n| success | ._success |\n| danger | ._danger |\n| fill | ._fill |\n| ghost | ._ghost |\n| link | ._link |\n| disabled | ._disabled |\n| loading | ._loading |\n| large | ._large |\n| middle | ._middle |\n| small | ._small |\n| capsule | ._capsule |\n| block | ._block |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu-system%2Fvue-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnu-system%2Fvue-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu-system%2Fvue-button/lists"}