uni - app - Property or method “toJSON“ is not defined on the instance but referenced during render.

完整报错

## SEO

[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.

在这里插入图片描述

解决方法

在当前报错页面,methods 方法中加入以下代码:

toJSON(){}

如下示例(什么都不需要写):
在这里插入图片描述

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页