SOURCE

function calFormErrors(errorList = []) {
  const formErrors = {}

  errorList.forEach((e) => {
    formErrors[e.param] = true
  })

  return formErrors
}
const errorList = [{param: true,name: 'zhang'}, {param: false}]
console.log(calFormErrors(errorList))
console 命令行工具 X clear

                    
>
console