mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
487001d697
.demo.md for component demo .demo-entry.md for demo entry .md for common docs
29 lines
665 B
Markdown
29 lines
665 B
Markdown
# Basic
|
|
```html
|
|
<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>
|
|
```
|
|
```js
|
|
export default {
|
|
data () {
|
|
return {
|
|
active: false,
|
|
placement: 'right'
|
|
}
|
|
},
|
|
methods: {
|
|
activate (placement) {
|
|
this.active = true
|
|
this.placement = placement
|
|
}
|
|
}
|
|
}
|
|
``` |