# cd-ui-btn

> 基于 Vue 的button组件

Latest version **1.6.1** (published 2020-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install cd-ui-btn
pnpm add cd-ui-btn
yarn add cd-ui-btn
bun add cd-ui-btn
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.1 |
| Published | 2020-09-28 |
| First published | 2020-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 68 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | louiscd@126.com |
| Maintainers | louis.cd |

## Links

- npm: https://www.npmjs.com/package/cd-ui-btn
- Repository: https://github.com/Louiscd/npm-demo
- Issues: https://github.com/Louiscd/npm-demo/issues
- npm.io page: https://npm.io/package/cd-ui-btn

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [core-js](https://npm.io/package/core-js.md) ^3.4.4

## Recent versions

- 1.6.1 (latest) — 2020-09-28
- 1.6.0 — 2020-09-28
- 1.5.0 — 2020-09-28
- 1.4.0 — 2020-09-27
- 1.3.0 — 2020-09-27
- 1.2.0 — 2020-09-27
- 1.1.0 — 2020-09-27
- 1.0.1 — 2020-01-17
- 1.0.0 — 2020-01-17

## README

# cd-ui-btn

## 安装

``` bash
$ npm install cd-ui-btn -S
```
## 使用

在 `main.js` 文件中引入插件并注册

``` bash
# main.js
import cdBtn from 'cd-ui-btn'
Vue.use(cdBtn)
```

在项目中使用 cdBtn

```js
<template>
  <section>
      <cd-button @click="clickBtn">默认按钮</cd-button>
      <cd-button type="primary" @click="clickBtn">主要按钮</cd-button>
      <cd-button type="success" @click="clickBtn">成功按钮</cd-button>
      <cd-button type="info" @click="clickBtn">信息按钮</cd-button>
      <cd-button type="warning" @click="clickBtn">警告按钮</cd-button>
    </section>
    <br />
    <section>
      <cd-button plain>朴素按钮</cd-button>
      <cd-button type="primary" plain>主要按钮</cd-button>
      <cd-button type="success" plain>成功按钮</cd-button>
      <cd-button type="info" plain>信息按钮</cd-button>
      <cd-button type="warning" plain>警告按钮</cd-button>
    </section>
    <br />
    <section>
      <cd-button round>圆角按钮</cd-button>
      <cd-button type="primary" round>主要按钮</cd-button>
      <cd-button type="success" round>成功按钮</cd-button>
      <cd-button type="info" round>信息按钮</cd-button>
      <cd-button type="warning" round>警告按钮</cd-button>
    </section>
    <br />
    <section>
      <cd-button type="primary" circle></cd-button>
      <cd-button type="success" circle></cd-button>
      <cd-button type="info" circle></cd-button>
      <cd-button type="warning" circle></cd-button>
    </section>
    <br />
    <section>
      <cd-button plain disabled>朴素按钮</cd-button>
      <cd-button type="primary" plain disabled>主要按钮</cd-button>
      <cd-button type="success" plain disabled>成功按钮</cd-button>
      <cd-button type="info" plain disabled>信息按钮</cd-button>
      <cd-button type="warning" plain disabled>警告按钮</cd-button>
    </section>
</template>
<script>
  export default {
    data () {
      return {
      }
    },
    methods: {
      clickBtn(e) {
        console.log(e);
      }
  }
  }
</script>
```

---
_Source: https://npm.io/package/cd-ui-btn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
