2019-12-27 13:49:00 +08:00
|
|
|
# Basic
|
|
|
|
```html
|
2019-12-31 18:24:20 +08:00
|
|
|
<div style="position: relative; height: 600px">
|
2019-12-27 13:49:00 +08:00
|
|
|
<n-nimbus-service-layout
|
|
|
|
name="Oasis"
|
|
|
|
:items="items"
|
|
|
|
:disable-menu="disableMenu"
|
|
|
|
v-model="selected"
|
2020-02-25 14:29:36 +08:00
|
|
|
@expandedNamesChange="changeOpen"
|
2019-12-27 13:49:00 +08:00
|
|
|
@select="changeSelect"
|
|
|
|
>
|
2019-12-31 18:24:20 +08:00
|
|
|
<template v-slot:drawer-header-icon>
|
|
|
|
<md-musical-notes />
|
|
|
|
</template>
|
|
|
|
Take me to the place where you go<br>
|
|
|
|
Where nobody knows if it's night or day<br>
|
|
|
|
But please don't put your life in the hands<br>
|
|
|
|
Of a Rock n Roll band<br>
|
|
|
|
Who'll throw it all away
|
|
|
|
<n-button @click="disableMenu = !disableMenu">
|
|
|
|
toggleDisableMenu
|
|
|
|
</n-button>
|
2019-12-27 13:49:00 +08:00
|
|
|
</n-nimbus-service-layout>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
import mdMusicalNotes from 'naive-ui/lib/icons/md-musical-notes'
|
2019-12-31 18:24:20 +08:00
|
|
|
|
2019-12-27 13:49:00 +08:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
mdMusicalNotes
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
disableMenu: false,
|
|
|
|
selected: null,
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
name: 'n-config-provider',
|
|
|
|
path: '/en-US/dark/n-config-provider'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: `Morning Glory`,
|
|
|
|
childItems: [
|
|
|
|
{
|
|
|
|
name: 'Hello',
|
|
|
|
path: '/en-US/dark/n-nimbus-service-layout?param=777'
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
changeOpen (names) {
|
2019-12-31 18:24:20 +08:00
|
|
|
// console.log('names', names)
|
2019-12-27 13:49:00 +08:00
|
|
|
},
|
|
|
|
changeSelect (val) {
|
2019-12-31 18:24:20 +08:00
|
|
|
// console.log('changeSelect', val)
|
2019-12-27 13:49:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
```
|
|
|
|
```css
|
|
|
|
|
|
|
|
```
|