单组件内部, props中属性的值 如何修改后?
报错信息
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"
——————————————————————————————————————
props: {
show: {
type: Boolean,
default: false
}
},
——————————————————————————————————————
created(){
this.show=true;
},
0 个回复