naive-ui/demo/documentation/components/popconfirm/enUS/custom-action.demo.md
2020-11-17 02:19:54 +08:00

744 B
Raw Blame History

Custom Action

<n-space>
  <n-popconfirm v-model:show="show">
    <template v-slot:trigger>
      <n-button>Quote</n-button>
    </template>
    For example, if I were to write about elephants, Id have had no idea what words to use.
    <template v-slot:action>
      <n-button
        size="small"
        @click="show = false"
      >
        Maybe
      </n-button>
    </template>
  </n-popconfirm>
  <n-popconfirm positive-text="Oops!">
    <template v-slot:trigger>
      <n-button>Quote</n-button>
    </template>
    For example, if I were to write about elephants, Id have had no idea what words to use.
  </n-popconfirm>
</n-space>
export default {
  data () {
    return {
      show: false
    }
  }
}