子組件使用父組件值,要改變使用用賦值方法,定義新變量:
定義新變量:copyTrendObj
此時copyTrendObj 可以被賦值
props: { trendObj: { type: Object, }, }, watch:{ 'trendObj':function(val) { this.copyTrendObj = val }, },