I have two simple vue components and want to use one in the default slot of the other. For some reason it takes only the first element but does not show anything after that. If I put standard before this first element it will show up normal, but if I place if after it will also not be displayed.
The page:
<div id="app">
<v-app>
<v-main>
<gantt-chart>
<div> this is visible </div>
<gantt-row key="1" title="test 1"/>
<div> nothing of this and beyond is shown</div>
<gantt-row key="2" title="test 2"/>
<gantt-row key="3" title="test 3"/>
</gantt-chart>
</v-main>
</v-app>
</div>
<script type="text/javascript">
Vue.component("gantt-chart", httpVueLoader('/plugin_assets/javascripts/components/GanttChart.vue'));
Vue.component("gantt-row", httpVueLoader('/plugin_assets/javascripts/components/GanttRow.vue'));
var app = new Vue({
el: '#app',
})
</script>
gantt-chart.vue:
<template>
<div>
<slot />
</div>
</template>
<script>
module.exports = {
props: [],
name:"GanttChart",
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped></style>
gantt-row.vue:
<template>
<div>
{{ title }}
</div>
</template>
<script>
module.exports = {
props: ["title"],
name:"GanttRow",
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped></style>
