2018-02-06 07:21:13 +00:00
|
|
|
|
|
|
|
|
|
<cn>
|
|
|
|
|
#### 基本
|
|
|
|
|
最简单的用法,4.5 秒后自动关闭。
|
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
|
|
<us>
|
|
|
|
|
#### Basic
|
|
|
|
|
The simplest usage that close the notification box after 4.5s.
|
|
|
|
|
</us>
|
|
|
|
|
|
|
|
|
|
```html
|
|
|
|
|
<template>
|
|
|
|
|
<a-button type="primary" @click="openNotification">Open the notification box</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2018-03-20 13:48:01 +00:00
|
|
|
|
import { notification } from 'antd'
|
2018-02-06 07:21:13 +00:00
|
|
|
|
export default {
|
|
|
|
|
methods: {
|
|
|
|
|
openNotification () {
|
2018-03-20 13:48:01 +00:00
|
|
|
|
notification.open({
|
2018-02-06 07:21:13 +00:00
|
|
|
|
message: 'Notification Title',
|
|
|
|
|
description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
```
|
|
|
|
|
|