naive-ui/demo/documentation/components/modal/enUS/presetConfirmSlot.md
2019-11-17 00:57:30 +08:00

436 B

Use Preset Confirm (Slot)

<n-button
  size="small"
  @click="isActive = true"
>
  Start Me up
</n-button>
<n-modal v-model="isActive" 
  preset="confirm"
  title="Confirm"
>
  <template v-slot:header>
    <div style="color:red;">title</div>
  </template>
  <div slot="content">content</div>
  <div slot="footer">footer</div>
</n-modal>
export default {
  data () {
    return {
      isActive: false,
    }
  }
}