[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders.

 

不能更改 quantity prop使其和父组件同步 , 而是让应该这个组件提交个事件给父组件,可以 watch quantity 变量,如果变量发生改变就emit事件,所以这里压根不需要 prop

 

https://blog.csdn.net/u014520745/article/details/75455979

 

posted @ 2019-05-29 10:09  Joyceandlee  阅读(261)  评论(0编辑  收藏  举报