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

541 B

事件

positive-click & negative-click

<n-popconfirm
  @positive-click="handlePositiveClick"
  @negative-click="handleNegativeClick"
>
  <template v-slot:trigger>
    <n-button>退出游戏</n-button>
  </template>
  我看 B 站的时候,听说有些游戏冲钱也是找罪受。
</n-popconfirm>
export default {
  inject: ['message'],
  methods: {
    handlePositiveClick () {
      this.message.info('positive click')
    },
    handleNegativeClick () {
      this.message.info('negative click')
    }
  }
}