三、vue报错use a data or computed property based on the prop's value.

  1.本来用父组件传值给子组值,再经过更改3d 发现报以上问题的错误 blog 缘由:prop是单向绑定,不能更改数据,只能由父组件传输过来 it 解决方法:能够在子组件中data中定义数据,使用$emit 和 $on 传给父组件,父组件接收后在赋值给当前要修改的数据。class
相关文章
相关标签/搜索