Collection.vue 866 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div class="collection">
  3. <h2 class="heading">
  4. <SmartIcon name="folder" class="svg-icons" />
  5. {{ collection.name || $t("state.none") }}
  6. </h2>
  7. <span
  8. v-for="(folder, index) in collection.folders"
  9. :key="`folder-${index}`"
  10. class="folder"
  11. >
  12. <DocsFolder :folder="folder" />
  13. </span>
  14. <div
  15. v-for="(request, index) in collection.requests"
  16. :key="`request-${index}`"
  17. >
  18. <DocsRequest :request="request" />
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. import { defineComponent } from "@nuxtjs/composition-api"
  24. export default defineComponent({
  25. props: {
  26. collection: { type: Object, default: () => {} },
  27. },
  28. })
  29. </script>
  30. <style scoped lang="scss">
  31. .collection {
  32. @apply flex flex-col flex-1;
  33. @apply justify-center;
  34. @apply p-4;
  35. .material-icons {
  36. @apply mr-4;
  37. }
  38. }
  39. </style>