vue 报错: Avoid mutating a prop directly since the value will be overwritten whenever the paren

可能错误原因:

 将父组件传给子组件的数据 ,重新赋值了

解决方法:

 例如:父组件传递的  current_page 

 在  created()方法将值赋给另一个变量 再进行运用

 如图所示:

   

接下来  直接用 current_pageinfo 进行一切操作

  

猜你喜欢

转载自blog.csdn.net/weixin_41472431/article/details/89364540