feat: 添加新增教练功能
This commit is contained in:
parent
8df9827367
commit
b07f961685
2 changed files with 47 additions and 15 deletions
|
|
@ -56,3 +56,14 @@ export const rejoin = (id) => {
|
|||
const target = list.find(item => item.id === id)
|
||||
target.quitDate = null
|
||||
}
|
||||
|
||||
|
||||
// 新增教练
|
||||
export const add = (coach) => {
|
||||
const newCoach = {
|
||||
id: list.length === 0 ? 1 : list[list.length -1].id + 1,
|
||||
...coach,
|
||||
quitDate: null
|
||||
}
|
||||
list.push(newCoach)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue