2019-09-29 00:13:01 +08:00
|
|
|
# Modal
|
2020-01-30 22:45:44 +08:00
|
|
|
It just pops and shows you something.
|
|
|
|
|
|
|
|
## Demos
|
2019-09-29 00:13:01 +08:00
|
|
|
```demo
|
|
|
|
basic
|
2020-01-30 22:45:44 +08:00
|
|
|
controlled
|
|
|
|
mask-closable
|
|
|
|
preset-card
|
2019-11-17 00:57:30 +08:00
|
|
|
preset-confirm
|
|
|
|
preset-confirm-slot
|
2020-01-30 22:45:44 +08:00
|
|
|
```
|
|
|
|
## V-model
|
|
|
|
|Prop|Event|
|
|
|
|
|-|-|
|
|
|
|
|show|hide|
|
|
|
|
|
|
|
|
## Props
|
|
|
|
### Modal
|
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
|
|
|
|show|`boolean`|`false`||
|
2020-02-08 16:07:07 +08:00
|
|
|
|mask-closable|`boolean`|`true`|Whether to emit `hide` event when click mask.|
|
2020-01-30 22:45:44 +08:00
|
|
|
|preset|`'card' \| 'confirm'`|`null`||
|
|
|
|
|
|
|
|
### Modal with Preset Card
|
|
|
|
See [Card props](n-card#Props)
|
|
|
|
### Modal with Preset Confirm
|
|
|
|
See [Confirm props](n-confirm#Props)
|
|
|
|
|
|
|
|
## Slots
|
|
|
|
### Modal without Preset
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
|
|
|
|
|
|
|
### Modal with Preset Card
|
|
|
|
See [Card slots](n-card#Slots)
|
|
|
|
### Modal with Preset Confirm
|
|
|
|
See [Confirm slots](n-confirm#Slots)
|
|
|
|
|
|
|
|
## Events
|
|
|
|
### Modal
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
2020-02-08 16:07:07 +08:00
|
|
|
|hide|`(show: false)`||
|
2020-01-30 22:45:44 +08:00
|
|
|
|
|
|
|
### Modal with Preset Card
|
|
|
|
See [Card events](n-card#Events)
|
|
|
|
### Modal with Preset Confirm
|
|
|
|
See [Confirm events](n-confirm#Events)
|