api-client/components/docs/Collection.vue

44 lines
866 B
Vue
Raw Normal View History

<template>
<div class="collection">
<h2 class="heading">
2021-08-28 00:17:33 +00:00
<SmartIcon name="folder" class="svg-icons" />
{{ collection.name || $t("state.none") }}
</h2>
2021-05-14 05:50:17 +00:00
<span
v-for="(folder, index) in collection.folders"
2021-07-13 23:49:08 +00:00
:key="`folder-${index}`"
2021-05-18 06:26:59 +00:00
class="folder"
2021-05-14 05:50:17 +00:00
>
<DocsFolder :folder="folder" />
</span>
2021-05-18 06:26:59 +00:00
<div
v-for="(request, index) in collection.requests"
:key="`request-${index}`"
>
<DocsRequest :request="request" />
</div>
</div>
</template>
<script>
2021-08-24 03:44:46 +00:00
import { defineComponent } from "@nuxtjs/composition-api"
export default defineComponent({
props: {
2021-05-18 06:26:59 +00:00
collection: { type: Object, default: () => {} },
},
2021-08-24 03:44:46 +00:00
})
</script>
2021-07-20 10:29:30 +00:00
<style scoped lang="scss">
.collection {
2021-06-26 10:41:19 +00:00
@apply flex flex-col flex-1;
@apply justify-center;
@apply p-4;
.material-icons {
@apply mr-4;
}
}
</style>