2019-11-17 00:57:30 +08:00
|
|
|
# Use Preset Card
|
2020-01-30 22:45:44 +08:00
|
|
|
Modal has some presets, which means you can use props & slots of the preset after set it.
|
2019-11-17 00:57:30 +08:00
|
|
|
```html
|
|
|
|
<n-button
|
2020-03-20 12:14:34 +08:00
|
|
|
@click="modalActive = true"
|
2019-11-17 00:57:30 +08:00
|
|
|
>
|
|
|
|
Start Me up
|
|
|
|
</n-button>
|
|
|
|
<n-modal
|
2020-03-20 12:14:34 +08:00
|
|
|
v-model="modalActive"
|
2019-11-17 00:57:30 +08:00
|
|
|
preset="card"
|
2020-03-04 23:38:19 +08:00
|
|
|
overlay-style="width: 600px;"
|
2019-11-17 00:57:30 +08:00
|
|
|
title="Modal"
|
|
|
|
:bordered="false"
|
|
|
|
size="huge"
|
|
|
|
:segmented="{
|
2019-12-24 22:39:25 +08:00
|
|
|
content: 'soft',
|
|
|
|
footer: 'soft'
|
2019-11-17 00:57:30 +08:00
|
|
|
}"
|
|
|
|
>
|
|
|
|
<template v-slot:header-extra>
|
|
|
|
Oops!
|
|
|
|
</template>
|
|
|
|
Content
|
|
|
|
<template v-slot:footer>
|
|
|
|
Footer
|
|
|
|
</template>
|
|
|
|
</n-modal>
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
2020-03-20 12:14:34 +08:00
|
|
|
modalActive: false,
|
2019-11-17 00:57:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|