mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
RoutableTabs: defaults to simple card if one tab
This commit is contained in:
parent
3b6b453f43
commit
b2fef109a5
2 changed files with 22 additions and 9 deletions
|
@ -1,13 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<routable-tabs
|
<div class="config-panel">
|
||||||
:routes="routes_"
|
<routable-tabs
|
||||||
v-bind="{ panels, forms, v: $v, ...$attrs }"
|
v-if="routes_.length > 1"
|
||||||
v-on="$listeners"
|
:routes="routes_"
|
||||||
>
|
v-bind="{ panels, forms, v: $v, ...$attrs }"
|
||||||
<slot name="tab-top" slot="tab-top"></slot>
|
v-on="$listeners"
|
||||||
<slot name="tab-before" slot="tab-before"></slot>
|
>
|
||||||
<slot name="tab-after" slot="tab-after"></slot>
|
<slot name="tab-top" slot="tab-top" />
|
||||||
</routable-tabs>
|
<slot name="tab-before" slot="tab-before" />
|
||||||
|
<slot name="tab-after" slot="tab-after" />
|
||||||
|
</routable-tabs>
|
||||||
|
|
||||||
|
<card v-else :title="routes_[0].text" :icon="routes_[0].icon">
|
||||||
|
<slot name="tab-top" />
|
||||||
|
<slot name="tab-before" />
|
||||||
|
<slot name="tab-after" />
|
||||||
|
</card>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -526,4 +526,8 @@ select {
|
||||||
.yuno-alert div div:not(:last-child) {
|
.yuno-alert div div:not(:last-child) {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.config-panel {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue