<template>
<view v-if="isDisplayRecords">
<Records ref="refRecords" />
</view>
<view v-if="isDisplayToolset">
<Toolset />
</view>
<view v-if="isDisplayMessage">
<Message />
</view>
<view v-if="isDisplayMine">
<Mine />
</view>
</template>
使用 composition-api ref 调用子组件方法,在切换组件时报错,错误如下
[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
1 个回复
sufu (作者)
ddddddd