naive-ui/demo/documentation/components/popconfirm/zhCN/event.md
2019-12-23 16:31:26 +08:00

444 B

Event

<n-popconfirm
  @positive-click="handlePositiveClick"
  @negative-click="handleNegativeClick"
>
  <template v-slot:activator>
    <n-button>Quit</n-button>
  </template>
  Are you sure to quit this game?
</n-popconfirm>
export default {
  methods: {
    handlePositiveClick () {
      this.$NMessage.info('positive click')
    },
    handleNegativeClick () {
      this.$NMessage.info('negative click')
    }
  }
}