mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
487001d697
.demo.md for component demo .demo-entry.md for demo entry .md for common docs
584 B
584 B
Use as a Component
Sometimes you may want to use a component.
<n-confirm
title="Confirm"
content="Are you sure?"
:closable="false"
negative-text="Cancel"
positive-text="Submit"
@positive-click="handlePositiveClick"
@negative-click="handleNegativeClick"
/>
export default {
methods: {
handleNegativeClick () {
this.$NMessage.waning('Cancel')
this.isActive = false
},
handlePositiveClick () {
this.$NMessage.success('Confirm')
this.isActive = false
}
}
}
.n-button {
margin: 0 12px 8px 0;
}