naive-ui/demo/documentation/components/modal/zhCN/presetConfirmSlot.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

459 B

使用 Confirm 预设的插槽

插槽也会随着预设变动。

<n-button
  @click="modalActive = true"
>
  来吧
</n-button>
<n-modal v-model="modalActive" 
  preset="confirm"
  title="Confirm"
>
  <template v-slot:header>
    <div>标题</div>
  </template>
  <div>内容</div>
  <template v-slot:action>
    <div>操作</div>
  </template>
</n-modal>
export default {
  data () {
    return {
      modalActive: false,
    }
  }
}