mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
665 B
665 B
Basic
<n-button-group>
<n-button @click="activate('top')">Top</n-button>
<n-button @click="activate('right')">Right</n-button>
<n-button @click="activate('bottom')">Bottom</n-button>
<n-button @click="activate('left')">Left</n-button>
</n-button-group>
<n-drawer v-model="active" :width="502" :placement="placement">
<n-h1>Stoner</n-h1>
<n-p>Stoner is a 1965 novel by the American writer John Williams.</n-p>
</n-drawer>
export default {
data () {
return {
active: false,
placement: 'right'
}
},
methods: {
activate (placement) {
this.active = true
this.placement = placement
}
}
}