子组件使用父组件值,要改变使用用赋值方法,定义新变量:
定义新变量:copyTrendObj
此时copyTrendObj 可以被赋值
props: { trendObj: { type: Object, }, }, watch:{ 'trendObj':function(val) { this.copyTrendObj = val }, },
props: { trendObj: { type: Object, }, }, watch:{ 'trendObj':function(val) { this.copyTrendObj = val }, },