mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-09 04:55:07 +00:00
36 lines
738 B
Vue
36 lines
738 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<v-list-item
|
||
|
v-for="(renderer, index) in render.contents"
|
||
|
:key="index"
|
||
|
class="pa-0"
|
||
|
>
|
||
|
<component
|
||
|
v-if="getComponents()[Object.keys(renderer)[0]]"
|
||
|
:is="Object.keys(renderer)[0]"
|
||
|
:key="index"
|
||
|
:render="renderer[Object.keys(renderer)[0]]"
|
||
|
></component>
|
||
|
</v-list-item>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import itemSectionRenderer from "../SectionRenderers/itemSectionRenderer.vue";
|
||
|
import shelfRenderer from "../SectionRenderers/shelfRenderer.vue";
|
||
|
|
||
|
export default {
|
||
|
components: {
|
||
|
itemSectionRenderer,
|
||
|
shelfRenderer,
|
||
|
},
|
||
|
props: ["render"],
|
||
|
|
||
|
methods: {
|
||
|
getComponents() {
|
||
|
return this.$options.components;
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
</script>
|