naive-ui/demo/documentation/components/modal/zhCN/index.md

56 lines
1016 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 模态框 Modal
它会弹出来,然后给你看点东西。
## 演示
```demo
basic
controlled
mask-closable
preset-card
preset-confirm
preset-confirm-slot
dark1-debug
dark2-debug
dark3-debug
dark4-debug
```
## V-model
|Prop|Event|
|-|-|
|show|hide|
## Props
### Modal
|名称|类型|默认值|说明|
|-|-|-|-|
|show|`boolean`|`false`||
|mask-closable|`boolean`|`true`|点击遮罩时是否发出 `hide` 事件|
|preset|`'card' \| 'confirm'`|`null`||
### ModalCard 预设)
参考 [Card props](n-card#Props)
### ModalConfirm 预设)
参考 [Confirm props](n-confirm#Props)
## Slots
### Modal无预设
|名称|参数|说明|
|-|-|-|
|default|`()`||
### ModalCard 预设)
参考 [Card slots](n-card#Slots)
### ModalConfirm 预设)
参考 [Confirm slots](n-confirm#Slots)
## Events
### Modal
|名称|参数|说明|
|-|-|-|
|hide|`(show: false)`||
### ModalCard 预设)
参考 [Card events](n-card#Events)
### ModalConfirm 预设)
参考 [Confirm events](n-confirm#Events)