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
582 B
582 B
使用组件
有的时候你可能想把它用作一个组件
<n-confirm
title="确认"
content="你确定"
:closable="false"
negative-text="不确认"
positive-text="确认"
@positive-click="handlePositiveClick"
@negative-click="handleNegativeClick"
/>
export default {
methods: {
handleNegativeClick () {
this.$NMessage.warning('取消')
this.isActive = false
},
handlePositiveClick () {
this.$NMessage.success('确认')
this.isActive = false
}
}
}
.n-button {
margin: 0 12px 8px 0;
}