naive-ui/demo/documentation/components/modal/enUS/presetCard.md
2020-03-05 13:45:45 +08:00

592 B

Use Preset Card

Modal has some presets, which means you can use props & slots of the preset after set it.

<n-button
  @click="isActive = true"
>
  Start Me up
</n-button>
<n-modal
  v-model="isActive"
  preset="card"
  overlay-style="width: 600px;"
  title="Modal"
  :bordered="false"
  size="huge"
  :segmented="{
    content: 'soft',
    footer: 'soft'
  }"
>
  <template v-slot:header-extra>
    Oops!
  </template>
  Content
  <template v-slot:footer>
    Footer
  </template>
</n-modal>
export default {
  data () {
    return {
      isActive: false,
    }
  }
}