naive-ui/demo/documentation/components/drawer/enUS/basic.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

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
}
}
}
```