Modular dialog box, displayed in the floating layer, guides users to perform related operations, often used in message prompts, message confirmation, or complete specific interaction operations on the current page。
弹出框组件支持函数调用和组件调用两种方式。
The pop -up box components support the function call and component call.
### 安装
### Install
```js
```js
import{Dialog}from'@nutui/nutui-react'
import{Dialog}from'@nutui/nutui-react'
```
```
## 代码演示
## Code demonstration
### 函数式调用
### Functional call
:::demo
```tsx
```tsx
<Celltitle="基础弹框"onClick={()=>{
importReactfrom"react";
Dialog.alert({
import{Cell,Dialog}from'@nutui/nutui-react';
title:'基础弹框',
content:'支持函数调用和组件调用两种方式。'
constApp=()=>{
});
return(
}}></Cell>
<>
<Celltitle="无标题弹框"onClick={()=>{
<Celltitle="Basic bullet"onClick={()=>{
Dialog.alert({
title:'Basic bullet',
content:'Support function calls and module call.'
});
}}>
</Cell>
<Celltitle="Non -title bullet box"onClick={()=>{
Dialog.alert({
content:'Non -title bullet box'
});
}}>
</Cell>
<Celltitle="Prompt bomb frame"onClick={()=>{
Dialog.alert({
Dialog.alert({
content:'无标题弹框'
title:'Kind tips',
});
content:'Support function calls and module call.',
}}></Cell>
noCancelBtn:true
<Celltitle="提示弹框"onClick={()=>{
});
Dialog.alert({
}}>
title:'温馨提示',
</Cell>
content:'支持函数调用和组件调用两种方式。',
<Celltitle="The bottom button is called vertically"onClick={()=>{
noCancelBtn:true
Dialog.alert({
});
title:'Kind tips',
}}></Cell>
content:'Support function calls and module call.',