不能更改 quantity prop使其和父组件同步 , 而是让应该这个组件提交个事件给父组件,可以 watch quantity 变量,如果变量发生改变就emit事件,所以这里压根不需要 prop
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders.
猜你喜欢
转载自www.cnblogs.com/fairylee/p/10942047.html
今日推荐
周排行