
vue 填坑知识(-)
component坑

- 上面的错误是由于我们在定义组件的时候使用的是 selfComponent 名字,但是引入的时候需要用横线代替驼峰命名
- 解决办法:
- 将html中的标签 selfComponent 改写为 self-component
- 后续如果遇到类似的错误可以参考上面的方法修改

- 由于组件与html的标签名字有冲突导致
待续

- 在父组件传递给子组件自定义props的时候,由于组件的属性名写为 headerMsg 导致报错,
- 需写为header-msg 然后在子组件的props中获取的key是:headerMsg
感谢您的阅读,本文由 Alex 版权所有。如若转载,请注明出处:Alex(https://sinianzhiren.github.io/2019/07/17/vue-start/)