所以我有这段代码正在传递prop,它是从父组件到另一个组件的房屋ID。这是我的代码
我哪里错了?
我尝试了一些类似https://router.vuejs.org/guide/essentials/passing-props.html的链接
和这个https://github.com/nuxt/nuxt.js/issues/297,但没有带来任何成功
//parent component
<v-flex sm5 mt-3 mr-2 v-for="houses in getadminhousesummary" :key="houses.id" >
//link <nuxt-link :to="'Building/'+houses.id" :house = "houses" >
<v-card >
<v-card-title class="primary shead justify-center"><h3><v-icon class="shead">home</v-icon>{{houses.name}}</h3></v-card-title>
<v-card-actions>
<v-layout row wrap>
<v-flex sm12>
<v-icon>location_on</v-icon>{{houses.location}}
</v-flex>
<v-flex sm12>
<v-btn flat>{{houses.units }}Units</v-btn>
<v-btn flat>{{houses.booked }}Booked</v-btn>
<v-btn flat>{{houses.units -houses.booked }}Empty</v-btn>
</v-flex>
</v-layout>
</v-card-actions>
</v-card>
</nuxt-link>
<v-divider></v-divider>
</v-flex>
//component where i want to receive the data
<template>
<v-container>
<p> hello {{house}} </p>
</v-container>
</template>
<script>
export default {
props: ['house'],
data(){
return{
}
},`enter code here`
layout:'building',
}
</script>