mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
574 B
574 B
Use as a Component
Sometimes you may want to use a component.
<n-confirm
title="Confirm"
content="Are you sure?"
:closable="false"
positive-text="Submit"
@positive-click="submitCallback"
@negative-click="cancelCallback"
negative-text="Cancel">
</n-confirm>
export default {
methods: {
cancelCallback () {
this.$NMessage.waning('Cancel')
this.isActive = false
},
submitCallback () {
this.$NMessage.success('Submit')
this.isActive = false
}
}
}
.n-button {
margin: 0 12px 8px 0;
}