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>
|
|
|
|
|
export default {
|
|
|
|
|
methods: {
|
|
|
|
|
openNotification () {
|
2018-04-08 13:17:20 +00:00
|
|
|
|
this.$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.',
|
2019-01-05 02:55:03 +00:00
|
|
|
|
onClick: () => {
|
|
|
|
|
console.log('Notification Clicked!');
|
|
|
|
|
},
|
2018-02-06 07:21:13 +00:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
```
|
|
|
|
|
|