Vue中错误整理(一)

 

1.Multiple root nodes returned from render function. Render function should return a single root node.(从渲染函数返回的多个根节点。渲染函数应该返回单个根节点。)

    错误原因:   我要循环这个li   但是我把id给这个li了  vue绑定这个id 所以 报错

 <li  id="adApp"  v-for="(item, index) in addressList" :key="index">

    解决方法: id给他的父级

    ps: 初学,低级错误.

2 Event "watchme" is emitted in component <Child> but the handler is registered for "watchMe". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "watch-me" instead of "watchMe".

     错误原因: 我在html标签上 使用了 watchMe 这种写法 

     解决方法 : watchMe 改成 watch-me

Logo

前往低代码交流专区

更多推荐