mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
487001d697
.demo.md for component demo .demo-entry.md for demo entry .md for common docs
38 lines
603 B
Markdown
38 lines
603 B
Markdown
# 使用 Card 预设
|
|
Modal 有一些预设,让你在设定之后可以使用对应的 Slots 还有 Props。
|
|
```html
|
|
<n-button
|
|
@click="modalActive = true"
|
|
>
|
|
来吧
|
|
</n-button>
|
|
<n-modal
|
|
v-model="modalActive"
|
|
preset="card"
|
|
overlay-style="width: 600px;"
|
|
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 {
|
|
modalActive: false,
|
|
}
|
|
}
|
|
}
|
|
``` |