mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
56 lines
1016 B
Markdown
56 lines
1016 B
Markdown
# 模态框 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`||
|
||
|
||
### Modal(Card 预设)
|
||
参考 [Card props](n-card#Props)
|
||
### Modal(Confirm 预设)
|
||
参考 [Confirm props](n-confirm#Props)
|
||
|
||
## Slots
|
||
### Modal(无预设)
|
||
|名称|参数|说明|
|
||
|-|-|-|
|
||
|default|`()`||
|
||
|
||
### Modal(Card 预设)
|
||
参考 [Card slots](n-card#Slots)
|
||
### Modal(Confirm 预设)
|
||
参考 [Confirm slots](n-confirm#Slots)
|
||
|
||
## Events
|
||
### Modal
|
||
|名称|参数|说明|
|
||
|-|-|-|
|
||
|hide|`(show: false)`||
|
||
|
||
### Modal(Card 预设)
|
||
参考 [Card events](n-card#Events)
|
||
### Modal(Confirm 预设)
|
||
参考 [Confirm events](n-confirm#Events)
|