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

24 lines
472 B
Markdown
Raw Normal View History

2019-10-21 15:37:41 +08:00
# Basic
```html
<n-popconfirm
2019-12-23 16:31:26 +08:00
@positive-click="handlePositiveClick"
@negative-click="handleNegativeClick"
2019-10-21 15:37:41 +08:00
>
<template v-slot:activator>
2019-12-23 16:31:26 +08:00
<n-button>Quote</n-button>
2019-10-21 15:37:41 +08:00
</template>
2019-12-23 16:31:26 +08:00
Things pass us by. Nobody can catch them. That's the way we live our lives.
2019-10-21 15:37:41 +08:00
</n-popconfirm>
2019-12-23 16:31:26 +08:00
```
```js
export default {
methods: {
handlePositiveClick () {
this.$NMessage.success('Yes')
},
handleNegativeClick () {
this.$NMessage.warning('No')
}
}
}
2019-10-21 15:37:41 +08:00
```