naive-ui/demo/documentation/components/popconfirm/enUS/event.md

25 lines
545 B
Markdown
Raw Normal View History

2019-10-21 15:37:41 +08:00
# Event
2020-01-30 20:10:03 +08:00
`positive-click` & `negative-click`
2019-10-21 15:37:41 +08:00
```html
<n-popconfirm
@positive-click="handlePositiveClick"
@negative-click="handleNegativeClick"
>
<template v-slot:activator>
<n-button>Quit</n-button>
</template>
2020-01-31 22:36:22 +08:00
I heared that players will still be abused after purchasing in some games when I watch Bilibili.
2019-10-21 15:37:41 +08:00
</n-popconfirm>
```
```js
export default {
methods: {
handlePositiveClick () {
this.$NMessage.info('positive click')
},
handleNegativeClick () {
this.$NMessage.info('negative click')
}
}
}
```