未验证 提交 b8af7f0a 编写于 作者: O oasis-cloud 提交者: GitHub

docs: dialog 组件的 taro 文档去掉函数调用方式 (#677)

上级 dbee1d71
......@@ -4,7 +4,7 @@
模态对话框,在浮层中显示,引导用户进行相关操作,常用于消息提示、消息确认,或在当前页面内完成特定的交互操作。
弹出框组件支持函数调用和组件调用两种方式
弹出框组件支持组件调用
### 安装
......@@ -15,50 +15,6 @@ import { Dialog } from '@nutui/nutui-react-taro'
## 代码演示
### 函数式调用
:::demo
```tsx
import React from "react";
import { Cell,Dialog } from '@nutui/nutui-react-taro';
const App = () => {
return (
<>
<Cell title="基础弹框" onClick={() => {
Dialog.alert({
title: '基础弹框',
content: '支持函数调用和组件调用两种方式。'
});
}} />
<Cell title="无标题弹框" onClick={() => {
Dialog.alert({
content: '无标题弹框'
});
}} />
<Cell title="提示弹框" onClick={() => {
Dialog.alert({
title: '温馨提示',
content: '支持函数调用和组件调用两种方式。',
noCancelBtn: true
});
}} />
<Cell title="底部按钮 垂直调用" onClick={() => {
Dialog.alert({
title: '温馨提示',
content: '支持函数调用和组件调用两种方式。',
footerDirection: 'vertical'
});
}} />
</>
)
}
export default App;
```
:::
### 组件调用
:::demo
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册