vue父组件向子组件传对象,不实时更新解决

vue报错:void mutating a prop directly since the value will be overwritten whenever the parent component re-renders.

Instead, use a data or computed property based on the prop's value. Prop being mutated:

看了很多大佬的方法,恕我直言,没有一个有用的,试了两天没什么用;

最后唯一的解决办法就是父子双向传参解决,话不多说,代码如下:

// 父组件引用 <hi-popSelect :isShow="isShow" @func="getMsg"></hi-popSelect>

  import popSelect from '../components/popSelect';

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsxdsx.html