After attempting to implement the slot feature following the example on the Vue official site, I encountered a failure despite keeping my code very concise.
Parent Component
<template>
<subMenuTemp>
<div class="text" >
parent content
</div>
</subMenuTemp>
</template>
<script>
import subMenuTemp from 'src/test/testChildren.vue'
export default {
data() {
},
components: {
subMenuTemp
}
}
</script>
Children Component in Another .vue File
<template>
<div class="content">
<slot>
old content
</slot>
</div>
</template>
<script>
export default {
}
</script>
Despite the brevity of the code, it's proving challenging for me to identify where exactly I've gone wrong.