naive-ui/demo/documentation/components/modal/enUS/presetConfirmSlot.md

32 lines
494 B
Markdown
Raw Normal View History

2019-11-15 17:44:43 +08:00
# Use Preset Confirm (Slot)
2020-01-30 22:45:44 +08:00
Slots are also related to preset.
2019-11-13 11:40:32 +08:00
```html
<n-button
@click="isActive = true"
>
Start Me up
</n-button>
<n-modal v-model="isActive"
preset="confirm"
title="Confirm"
>
<template v-slot:header>
2020-02-04 14:55:55 +08:00
<div>title</div>
</template>
<template v-slot:content>
<div>content</div>
</template>
<template v-slot:action>
<div>action</div>
2019-11-13 11:40:32 +08:00
</template>
</n-modal>
```
```js
export default {
data () {
return {
isActive: false,
}
}
}
```