# Notice组件

通知弹框，会在右侧上方出现，需要主动关闭

## 使用说明

常驻的通知弹框，有多种状态样式，定制内容相对丰富,没有设置btnTxt和text是为简易模式，当duration为0时候，简易模式会出现关闭按钮

## 示例

::: demo
```html
<template>
  <div class="demo">
    <s-button type="primary" @click="notice1">点我有惊喜</s-button>
    <s-button type="error" @click="notice2">点我也有惊喜</s-button>
  </div>
</template>
<script>
  export default {
    methods: {
      notice1 () {
        this.$snotice({title: '通知', text: '你收到了一个通知', type: 'info', btnTxt: '很好'})
      },
      notice2 () {
        this.$snotice({title: '你又收到了一个通知', type: 'info'})
      }
    }
  }
</script>
```
:::

## API
|  参数   | 说明  |  类型  | 默认值 | 可选值 |
|  ----  | ----  | ----  | ----  | ----  |
| title | 设置标题 | string | - | - |
| text | 设置文字，可用标签 | string | - | - |
| type | 设置类型，设置此选，将会出现对应类型等icon，色值等 | string | - | info/success/error/warning |
| btnTxt | 按钮文字，目前只支持1个蛋妞 | string | 确定 | - |
| duration | 自动消失延迟时间，为0时不会消失 | string | 6 | - |
| @btnClick | 绑定按钮的click事件 | event | - | - |


