ant-design-vue/components/notification/demo/custom-icon.md

31 lines
684 B
Markdown
Raw Normal View History

2018-02-06 07:21:13 +00:00
<cn>
#### 自定义图标
图标可以被自定义。
</cn>
<us>
#### Customized Icon
The icon can be customized to any vue node or (h) => vue node.
</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.',
2018-12-09 10:08:47 +00:00
icon: <a-icon type="smile" style="color: #108ee9" />,
2018-02-06 07:21:13 +00:00
});
},
}
}
</script>
```