控制台报异常:
[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: "show"
问题代码:
定义了一个子组件,入参为show,然后在子组件的方法中进行修改show的值时发生异常。
正确修改:
将修改值的方式放到父组件中进行修改即可