看不到子组件引用

时间:2020-01-28 17:00:13

标签: vue.js

我有2个组件,一个组件是我主要组件的子组件。

例如:

<component-one>
    <template v-slot:slot-one>
        <component-two ref="example"></component-two>
    </template>
</component-one>

但是,当我运行this.$refs时,看不到该组件的example引用。我尝试将其放入this.$nextTick(() => {});

0 个答案:

没有答案