mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-24 12:45:18 +08:00
573 B
573 B
使用组件
有的时候你可能想把它用作一个组件
<n-confirm
title="确认"
content="你确定"
:closable="false"
positive-text="确认"
@positive-click="submitCallback"
@negative-click="cancelCallback"
negative-text="不确认">
</n-confirm>
export default {
methods: {
cancelCallback () {
this.$NMessage.warning('取消')
this.isActive = false
},
submitCallback () {
this.$NMessage.success('确认')
this.isActive = false
}
}
}
.n-button {
margin: 0 12px 8px 0;
}