0
得到孩子的指數我有分量:vuejs如何從孩子的方法
Vue.component('child', {
template : '#child-tpl',
props : {
child : Object
}
},
methods : {
index : function() {
return ???; // current index
}
}
});
這孩子可以重新排序/刪除/添加dinamically。需要存儲這個孩子的實際當前指標。 如何獲得父母孩子數組的目標孩子的當前索引?
你可以添加在正在使用孩子的代碼? – Saurabh