代码拉取完成,页面将自动刷新
将线性图样例 http://doc.ucharts.cn/1172181 插入我的 uniapp 项目,图能正常显示出来,但会导致我的页面上其它内容都显示不出来。不插入图的时候没问题。
该问题在浏览器上看 h5 版本没问题,但在安卓 app 里会出问题。
从报错信息上看,跟对某个对象进行JSON序列化JSON.stringify
有关,该对象可能有自引行为。
报错信息:
null:613 [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.
(found in my-pages/record/view)
null:5630 TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
--- property '_renderProxy' closes the circle
at JSON.stringify (<anonymous>)
at cloneWithData (null:5615)
at VueComponent.patch [as __patch__] (null:5628)
at VueComponent.Vue._update (null:3965)
at VueComponent.updateComponent (null:5696)
at Watcher.get (null:4425)
at Watcher.run (null:4500)
at flushSchedulerQueue (null:4256)
at Array.eval (null:1990)
at flushCallbacks (null:1918)
从 https://ask.dcloud.net.cn/question/73642 找到了解决办法。要用全局变量,不能绑定在 Vue 对象上。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论