## BXS-UI-VUE

### 概述
保险师VUE组件库

### 开发
```bash
## 安装依赖
npm install

## 启动example
npm run dev

## 构建
npm run build
```

### 本地调试
使用npm link bxs-ui-vue和npm unlink bxs-ui-vue
```bash
## 到bxs-ui工程下执行
npm link

## 到业务工程下执行
npm link bxs-ui-vue

## 取消本地调试执行
npm unlink bxs-ui-vue
```

### 使用
npm install [bxs-ui-vue](https://www.npmjs.com/package/bxs-ui-vue)
```shell
npm install bxs-ui-vue --save-dev
```
使用[babel-plugin-component](https://www.npmjs.com/package/babel-plugin-component)
```js
"plugins": [
  [
    "component", {
      "libraryName": "bxs-ui-vue",
      "libDir": "lib",
      "style": "index.css"
    }
  ]
]
```
与mint-ui同时使用
```js
"plugins": [
  [
    "component", [{
      "libraryName": "mint-ui",
      "style": true
    },{
      "libraryName": "bxs-ui-vue",
      "libDir": "lib",
      "style": "index.css"
    }]
  ]
]
```
导入所有组件
```js
import Vue from 'vue'
import Bxs from 'bxs-ui-vue'
Vue.use(Bxs)
```
```html
<bxs-badge></bxs-badge>
```
```js
export default {
  mounted () {
    this.$toast('hello world')
  }
}
```
按需引入组件
```html
<bxs-badge></bxs-badge>
```
```js
import { Toast, Badge } from 'bxs-ui-vue'
export default {
  mounted () {
    Toast('hello world')
  },
  components: {
    [Badge.name]: Badge
  }
}
```
或
```js
import Vue from 'vue'
import { Toast, Badge } from 'bxs-ui-vue'
Vue.use(Toast)
Vue.use(Badge)
```
```html
<bxs-badge></bxs-badge>
```
```js
export default {
  mounted () {
    this.$toast('hello world')
  }
}
```
