I have the main list in the whole of programs with contains such items:
{id:1,text:'a',checked:false}
this scenario :
the Search component shows pure of list items either checked or not checked.
the Side Component shows the items checked properly and then click the close button it should disappear and uncheck items simultaneously.
so Search Component bind to the list by :
<input type="checkbox" :value="item.checked" v-model="$store.state.sideBarItems[index].checked">
so my answer is [index].checked
which make a proper two-way data binding.
tnx to this post which gives me an idea
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…