fix(service-layout): padding body in a right manner

This commit is contained in:
07akioni 2019-08-01 15:08:53 +08:00
parent c5ef043735
commit f23a532b67
3 changed files with 9 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<n-nimbus-service-layout
icon="md-contacts"
:name="`NAIVE UI (${version})`"
:padding-body="false"
:padding-body="true"
:items="items"
>
<router-view />

View File

@ -3,10 +3,16 @@
<div><slot name="header" /></div>
<div
class="n-nimbus-service-layout__body"
:class="{ 'n-nimbus-service-layout__body--collapsed': isCollapsed, 'n-nimbus-service-layout__body--active': !isCollapsed, 'n-nimbus-service-layout__body--padded': paddingBody }"
:class="{ 'n-nimbus-service-layout__body--collapsed': isCollapsed, 'n-nimbus-service-layout__body--active': !isCollapsed }"
>
<scrollbar>
<slot />
<div
:style="{
padding: paddingBody ? '21px 48px' : 0
}"
>
<slot />
</div>
</scrollbar>
</div>
<div

View File

@ -35,9 +35,6 @@
&.n-nimbus-service-layout__body--collapsed {
left: 48px;
}
&.n-nimbus-service-layout__body--padded {
padding: 21px 48px;
}
}
.n-nimbus-service-layout__drawer {
display: inline-block;