1、[Vue warn]: Method "computed" has type "object" in the component definition. Did you reference the function correctly?
运行项目,发现报错,查看了错误原因,竟然粗心地将computed计算属性放在了methods中,它们俩应该是同级的,改成同级之后错误就消失了。
2、在通过遍历的方式进行页面的渲染时,发生报错如下:
[Vue warn]: Invalid prop: type check failed for prop "index". Expected String, got Undefined
去Element UI官方文档查看,发现index必须使用string/null数据类型,如下图所示:
在属性 :index后面拼接一个空字符 ,加号拼接字符串都是字符串,这样问题就解决了。