naive-ui/demo/documentation/components/popconfirm/zhCN/basic.demo.md
2020-09-27 03:03:14 +08:00

489 B

基础用法

<n-popconfirm
  @positive-click="handlePositiveClick"
  @negative-click="handleNegativeClick"
>
  <template v-slot:trigger>
    <n-button>引用</n-button>
  </template>
  一切都将一去杳然,任何人都无法将其捕获。
</n-popconfirm>
export default {
  inject: ['message'],
  methods: {
    handlePositiveClick () {
      this.message.success('是的')
    },
    handleNegativeClick () {
      this.message.warning('并不')
    }
  }
}