vue常见报错汇总

来源:互联网 发布:淘宝客户数据分析 编辑:程序博客网 时间:2024/06/14 18:50

自己踩过的坑,给别人留下铁锹,慢慢积累。

Uncaught SyntaxError: Unexpected identifier

     最小白的错误之一,找到相应的行数,看看您老是不是少了个逗号..再或者是不是字符串没有加双引号?。

Uncaught SyntaxError: Invalid or unexpected token

    翻译:”无效或意外的标记“。    最小白错误之二,找到相应行数,您老是不是中英文符号切换错了...十之八九。

[Vue warn]: “style” is a reserved attribute and cannot be used as component prop.
found in
—>

    定义的prop是保留字或者属性,不能在组件里这么使用,大概这个意思,换个名字就好用了少年。

[Vue warn]: Property or method “success” is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.

    你使用的属性或者方法没有定义....看看你的methods或者prop/data吧少年...