Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
571 views
in Technique[技术] by (71.8m points)

vuejs3 - Rendering array of objects in child component in vue.js

I'm trying to render an array in a child component but am getting a bit confused. The props and the component are correctly declared in the parent component and I console.logged cryptoList7d (which is an array of objects) to be sure it was correctly stored and it is.

Parent component:

<td v-bind:key="index" v-for="(elt7d, index) in cryptoList7d">
     <item7d :elt7d="elt7d"></item7d>
</td>

Child component:

<template>
    <div>
        <td>
            <p>{{ elt7d.name }}</p>
        </td>
    </div>
</template>

<script>
export default {
    name: "item7d",
    props: ['cryptoList7d', 'elt7d']
}
</script>
<style scoped>

</style>

I'm not getting any error but nothing is rendering.

Thanks in advance for the help.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...