naive-ui/demo/documentation/components/drawer/enUS/multiple.md

31 lines
687 B
Markdown
Raw Normal View History

2020-02-08 16:07:25 +08:00
# Multiple Drawers
```html
<n-button @click="activate">Come on!</n-button>
2020-03-03 19:25:25 +08:00
<n-drawer v-model="active" :width="502">
2020-02-08 16:07:25 +08:00
<n-h1>Stoner</n-h1>
<n-p>Stoner is a 1965 novel by the American writer John Williams.</n-p>
<n-button @click="innerActivate">Come on Again!</n-button>
2020-03-03 19:25:25 +08:00
<n-drawer v-model="innerActive" :width="251">
2020-02-08 16:07:25 +08:00
<n-h1>Stoner</n-h1>
<n-p>Stoner is a 1965 novel by the American writer John Williams.</n-p>
</n-drawer>
</n-drawer>
```
```js
export default {
data () {
return {
active: false,
innerActive: false
}
},
methods: {
activate () {
this.active = true
},
innerActivate () {
this.innerActive = true
}
}
}
```