2020-02-04 14:55:55 +08:00
|
|
|
# 使用 Card 预设
|
|
|
|
Modal 有一些预设,让你在设定之后可以使用对应的 Slots 还有 Props。
|
|
|
|
```html
|
|
|
|
<n-button
|
|
|
|
@click="isActive = true"
|
|
|
|
>
|
2020-03-05 13:45:45 +08:00
|
|
|
来吧
|
2020-02-04 14:55:55 +08:00
|
|
|
</n-button>
|
|
|
|
<n-modal
|
|
|
|
v-model="isActive"
|
|
|
|
preset="card"
|
2020-03-04 23:38:19 +08:00
|
|
|
overlay-style="width: 600px;"
|
2020-02-04 14:55:55 +08:00
|
|
|
title="卡片预设"
|
|
|
|
:bordered="false"
|
|
|
|
size="huge"
|
|
|
|
:segmented="{
|
|
|
|
content: 'soft',
|
|
|
|
footer: 'soft'
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<template v-slot:header-extra>
|
|
|
|
噢!
|
|
|
|
</template>
|
|
|
|
内容
|
|
|
|
<template v-slot:footer>
|
|
|
|
尾部
|
|
|
|
</template>
|
|
|
|
</n-modal>
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
isActive: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|