const getPrimaryKey = (resource: string, primaryKeys:
Map<string, PrimaryKey>) => {
return primaryKeys.get(resource) || ['id'];
}
判断当前得map属性中有没有该属性 有就返回该属性得值
否则返回["id"]
传入值
输出
["id"]
目前项目中返回得都是["id"]
const getPrimaryKey = (resource: string, primaryKeys:
Map<string, PrimaryKey>) => {
return primaryKeys.get(resource) || ['id'];
}
判断当前得map属性中有没有该属性 有就返回该属性得值
否则返回["id"]
传入值
输出
["id"]
目前项目中返回得都是["id"]