mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
811 B
811 B
Custom Action
<n-popconfirm :controller="controller">
<template v-slot:activator>
<n-button>Quote</n-button>
</template>
For example, if I were to write about elephants, I’d have had no idea what words to use.
<template v-slot:action>
<n-button
size="tiny"
@click="handleClick"
>
Maybe
</n-button>
</template>
</n-popconfirm>
<n-popconfirm positive-text="Oops!">
<template v-slot:activator>
<n-button>Quote</n-button>
</template>
For example, if I were to write about elephants, I’d have had no idea what words to use.
</n-popconfirm>
export default {
data () {
return {
controller: {}
}
},
methods: {
handleClick () {
this.controller.hide()
}
}
}
.n-button {
margin-right: 8px;
}