2019-11-19 17:27:53 +08:00
|
|
|
# Trigger Button
|
2020-02-03 20:13:14 +08:00
|
|
|
A trigger button, for free.
|
2019-11-19 17:27:53 +08:00
|
|
|
```html
|
|
|
|
<n-switch v-model="collapsed" />
|
|
|
|
<n-layout style="height: 240px;">
|
|
|
|
<n-layout-header style="height: 64px;">
|
|
|
|
Cool Header
|
|
|
|
</n-layout-header>
|
|
|
|
<n-layout>
|
|
|
|
<n-layout-sider
|
|
|
|
collapse-mode="width"
|
|
|
|
show-trigger
|
|
|
|
:collapsed-width="120"
|
|
|
|
:width="240"
|
|
|
|
:collapsed="collapsed"
|
|
|
|
@collapse="collapsed = true"
|
|
|
|
@expand="collapsed = false"
|
|
|
|
>
|
2019-12-28 13:46:37 +08:00
|
|
|
<n-h1>Sider</n-h1>
|
2019-11-19 17:27:53 +08:00
|
|
|
</n-layout-sider>
|
|
|
|
<n-layout style="padding: 24px;">
|
|
|
|
<n-layout-content>
|
|
|
|
<span>Content</span>
|
|
|
|
</n-layout-content>
|
|
|
|
<n-layout-footer>
|
2019-12-28 13:46:37 +08:00
|
|
|
<n-h1>Footer</n-h1>
|
2019-11-19 17:27:53 +08:00
|
|
|
</n-layout-footer>
|
|
|
|
</n-layout>
|
|
|
|
</n-layout>
|
|
|
|
</n-layout>
|
2020-03-08 00:06:05 +08:00
|
|
|
<n-layout style="height: 240px; overflow: hidden;">
|
|
|
|
<n-layout-header position="absolute" style="height: 64px;">
|
2019-11-19 17:27:53 +08:00
|
|
|
Cool Header
|
|
|
|
</n-layout-header>
|
2020-03-08 00:06:05 +08:00
|
|
|
<n-layout position="absolute" style="top: 64px;">
|
2019-11-19 17:27:53 +08:00
|
|
|
<n-layout-sider
|
2020-03-08 00:06:05 +08:00
|
|
|
position="absolute"
|
2020-03-21 15:05:26 +08:00
|
|
|
show-trigger="arrow-circle"
|
2019-11-19 17:27:53 +08:00
|
|
|
collapse-mode="transform"
|
|
|
|
:collapsed-width="120"
|
|
|
|
:width="240"
|
|
|
|
:collapsed="collapsed"
|
|
|
|
@collapse="collapsed = true"
|
|
|
|
@expand="collapsed = false"
|
|
|
|
>
|
2019-12-28 13:46:37 +08:00
|
|
|
<n-h1>Sider</n-h1>
|
2019-11-19 17:27:53 +08:00
|
|
|
</n-layout-sider>
|
|
|
|
<n-layout
|
2020-03-08 00:06:05 +08:00
|
|
|
position="absolute"
|
2019-11-19 17:27:53 +08:00
|
|
|
style="padding: 24px;"
|
|
|
|
>
|
|
|
|
<n-layout-content>
|
|
|
|
<span>Content</span>
|
|
|
|
</n-layout-content>
|
|
|
|
<n-layout-footer>
|
2019-12-28 13:46:37 +08:00
|
|
|
<n-h1>Footer</n-h1>
|
2019-11-19 17:27:53 +08:00
|
|
|
</n-layout-footer>
|
|
|
|
</n-layout>
|
|
|
|
</n-layout>
|
|
|
|
</n-layout>
|
|
|
|
```
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
collapsed: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|