0
得到孩子的指数我有分量:vuejs如何从孩子的方法
Vue.component('child', {
template : '#child-tpl',
props : {
child : Object
}
},
methods : {
index : function() {
return ???; // current index
}
}
});
这孩子可以重新排序/删除/添加dinamically。需要存储这个孩子的实际当前指标。 如何获得父母孩子数组的目标孩子的当前索引?
你可以添加在正在使用孩子的代码? – Saurabh