Components can specify requirements for its props, such as the types you’ve already seen. If a requirement isn’t met, Vue will warn you in the browser’s JavaScript console. This is especially useful when developing a component that’s intended to be u
props是不能改变的 项目里遇到一个问题,就是props的组件内是不能改变,就像react中的props值也是不能改变的, 所以我在用的时候竟然忽略了这个点.真的要反省反省, 下面就是这个报错的问题: use a data or computed property based on the prop's value 如何双向绑定 我做的是一个弹框的组件让在父组件调用,关闭和开启 子组件:这样 <section class="app-body" v-if="myShar