Custom span size in each group

pull/563/head
chain710 2022-12-02 15:39:15 +08:00
parent 70f583c3e1
commit 1e2501b9f7
2 changed files with 7 additions and 2 deletions

View File

@ -121,6 +121,8 @@ services:
icon: "fas fa-code-branch"
# A path to an image can also be provided. Note that icon take precedence if both icon and logo are set.
# logo: "path/to/logo"
# Use custom span size instead of 12/columns
# span: 6
items:
- name: "Awesome app"
logo: "assets/tools/sample.png"

View File

@ -92,7 +92,7 @@
:key="`service-${groupIndex}-${index}`"
:item="item"
:proxy="config.proxy"
:class="['column', `is-${12 / config.columns}`]"
:class="['column', `is-${getSpan(group)}`]"
/>
</template>
</div>
@ -103,7 +103,7 @@
class="columns is-multiline layout-vertical"
>
<div
:class="['column', `is-${12 / config.columns}`]"
:class="['column', `is-${getSpan(group)}`]"
v-for="(group, groupIndex) in services"
:key="groupIndex"
>
@ -312,6 +312,9 @@ export default {
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
},
getSpan: function (item) {
return item.span || 12 / this.config.columns;
},
},
};
</script>