vue父组件更改自组建的值得时候报错这个的解决办法 Instead, use a data or computed property based on the prop's value

[Vue warn]: 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: "propTextTip"

 

父组件引入子组件,子组件是一个input。父组件再输入文字时会出现该警告,大致的意思是“避免直接改变属性,因为当父组件重新呈现时,该值将被覆盖。相反,使用基于属性值的数据或计算属性”

 

然后查了查办法,可以在子组件新定义一个变量来接受父组件传过来的值,避免直接操作更改组件之间的变量就可以避免该警告。zlinkman zmyword都是新变量,linkman是父组件传过来的变量

vue父组件更改自组建的值得时候报错这个的解决办法 Instead, use a data or computed property based on the prop's value