Vue父子間傳值
報錯
Avoid 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: "selectType"
原因:父組件傳給子組件的值,在子組件當中重新賦值
1、父組件:傳值
2、子組件用prop接收
如果要對傳入的值從新賦值
需要在data裏面給他一個初始值