onload中接收的参数,在模板字符串中使用报错?

发布于 5 年前作者 fchang1371 次浏览最后编辑 5 年前来自 issues

我在onload中接收上个页面传过来的数据,在data里声明了个变量在模板字符串中写了这个数据,运行时报defined错误

2 回复
taojun
taojun1 楼4 年前

首先在data里面的数据不可以相互访问,所以information会报undefined,如果content必须要是用data里面的数据可以用computed

minlei
minlei2 楼7 个月前

不应该用_this.information 应该用 _this.data.information