<docs>
---
order: 4
title:
zh-CN: 信息提示
en-US: Information modal dialog
## zh-CN
各种类型的信息提示,只提供一个按钮用于关闭。
## en-US
In the various types of information modal dialog, only one button to close dialog is provided.
</docs>
<template>
<a-space wrap>
<a-button @click="info">Info</a-button>
<a-button @click="success">Success</a-button>
<a-button @click="error">Error</a-button>
<a-button @click="warning">Warning</a-button>
</a-space>
</template>
<script lang="ts">
import { Modal } from 'ant-design-vue';
import { defineComponent, h } from 'vue';
export default defineComponent({
setup() {
const info = () => {
Modal.info({
title: 'This is a notification message',
content: h('div', {}, [
h('p', 'some messages...some messages...'),
]),
onOk() {
console.log('ok');
},
});
};
const success = () => {
Modal.success({
title: 'This is a success message',
const error = () => {
Modal.error({
title: 'This is an error message',
content: 'some messages...some messages...',
const warning = () => {
Modal.warning({
title: 'This is a warning message',
return {
info,
success,
error,
warning,
</script>