目前,我有一个vue-multiselect组件,它需要一个v-model。
我想包装这个组件,这样我就可以构建一个单一选择组件和一个多选择组件。
在处理单个select组件时,我遇到了以下警告
[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 bein
我得到了一个错误:“避免直接变异一个道具,因为当父组件重新呈现时,值将被覆盖。相反,使用基于该支柱的值的数据或计算属性。当我试图将一个用于从父组件到子组件的安装的部分移动后,支柱被变异:"filter”。模板正在呈现,但是当我输入输入时,我得到了这个错误。
In Child
<b-form-input
v-model="filter"
type="search"
id="filterInput"
placeholder="Type to Search