如下,如何取得children然後更新到father.children中,頁面就可以清單展示了
state: {
father: [
{
name: 'wang',
children: []
}
]
}
action: {
getChildren(fatherId).then(children => {
// 获得children,如何更新到father.children中
});
}
大概這樣吧,去看看文件吧