
#  Notice 通知提醒
---
### 普通提示，警告提示，成功提示，失败提示,默认3秒后消失
* 普通提示```info```方法
* 警告提示```warning```方法
* 成功提示```success```方法
* 失败提示```error```方法
* 可以自定义配置，其中```duration```来控制自动关闭时长

<div class="demo-block">
  <y-button @click="info" type="default">普通提示</y-button>
  <y-button @click="warning" type="default">警告提示</y-button>
  <y-button @click="success" type="default">成功提示</y-button>
  <y-button @click="error" type="default">失败提示</y-button>
</div>
<script>
export default{
  methods:{
    info() {
      this.$Notice.info({
        title: "这是普通提示的标题",
        content: "这是普通提示的消息的描述啊",
        duration: 500
      });
    },
    warning() {
      this.$Notice.warning({
        title: "这是警告提示的标题",
        content: "这是警告的消息的描述啊",
        duration: 500
      });
    },
    success() {
      this.$Notice.success({
        title: "这是成功提示的标题",
        content: "这是成功的消息的描述啊",
        duration: 500
      });
    },
    error() {
      this.$Notice.error({
        title: "这是失败提示的标题",
        content: "这是失败的消息的描述啊",
        duration: 500
      });
    },
   }
  }
</script>

::: demo

``` html
<template>
  <y-button @click="info" type="default">普通提示</y-button>
  <y-button @click="warning" type="default">警告提示</y-button>
  <y-button @click="success" type="default">成功提示</y-button>
  <y-button @click="error" type="default">失败提示</y-button>  
</template>

<script>
export default{
  methods:{
    info() {
      this.$Notice.info({
        title: "这是普通通知的消息",
        content: "这是普通通知的消息的描述啊",
        duration: 500
      });
    },
    warning() {
      this.$Notice.warning({
        title: "这是警告通知的消息",
        content: "这是警告通知的消息的描述啊",
        duration: 500
      });
    },
    success() {
      this.$Notice.success({
        title: "这是成功通知的消息",
        content: "这是成功通知的消息的描述啊",
        duration: 500
      });
    },
    error() {
      this.$Notice.error({
        title: "这是失败通知的消息",
        content: "这是失败通知的消息的描述啊",
        duration: 500
      });
    },
   }
  }
</script>
```
:::




###  属性说明
| 属性      | 说明     | 类型      | 可选值        | 默认值   |
|---------- |--------  |---------- |-------------  |-------- |
|title|提示的标题|String|--|--| 
|content|提示的内容|String|--|--| 
|duration  | 自动关闭的延时，单位秒，0为 不自动关闭 | Number| --| 5 |

