feat: pattern config

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-01-11 23:53:53 +08:00
parent 53af03648e
commit 2ba3bb036b
18 changed files with 621 additions and 147 deletions

View File

@@ -27,3 +27,12 @@ export const addOtherInfo=(personList:any[])=>{
return personList
}
export const selectCard=(cardIndexArr:number[],tableLength:number,personId:number):number=>{
const cardIndex = Math.round(Math.random() * (tableLength-1));
if(cardIndexArr.includes(cardIndex)){
return selectCard(cardIndexArr,tableLength,personId)
}
return cardIndex
}