VUE开发报错:Avoid mutating a prop directly since the value will be overwritten whenever the parent ...
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: "xxx".
翻译:避免直接修改 props 的值,因为每当父组件重新渲染时,props 的值将被覆盖。相反,使用基于 props 值的数据或计算属性。
意思就是,不要直接使用父组件传的值进行渲染,要使用另一个可替代参数或计算属性。