2020-02-08 16:07:25 +08:00
|
|
|
# 多个抽屉
|
|
|
|
```html
|
|
|
|
<n-button @click="activate">来一个</n-button>
|
2020-02-29 16:17:42 +08:00
|
|
|
<n-drawer v-model="active" :width="502" :z-index="3002">
|
2020-02-08 16:07:25 +08:00
|
|
|
<n-h1>斯通纳</n-h1>
|
|
|
|
<n-p>《斯通纳》是美国作家约翰·威廉姆斯在 1965 年出版的小说。</n-p>
|
|
|
|
<n-button @click="innerActivate">再来个抽屉</n-button>
|
2020-02-29 16:17:42 +08:00
|
|
|
<n-drawer v-model="innerActive" :width="251" :z-index="3003">
|
2020-02-08 16:07:25 +08:00
|
|
|
<n-h1>斯通纳</n-h1>
|
|
|
|
<n-p>《斯通纳》是美国作家约翰·威廉姆斯在 1965 年出版的小说。</n-p>
|
|
|
|
</n-drawer>
|
|
|
|
</n-drawer>
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
active: false,
|
|
|
|
innerActive: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
activate () {
|
|
|
|
this.active = true
|
|
|
|
},
|
|
|
|
innerActivate () {
|
|
|
|
this.innerActive = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|