我尝试访问Vue文件中的Vue组件。
<template>
{{this.tables}}
</template>
export default {
name: 'test',
data() {
return {
}
},
computed:{
tables() {
console.log(this.$children);
},
}
当我使用console.log(this.$children);
时,结果如下
现在,我想从display_table
vuecomponent访问并获取$children
的项目。所以我使用console.log(this.$children[0]);
,但这个返回undefined
。有人可以告诉我一些有关如何获取display_table
中的项目的见解吗?