您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

getDefaultContext.js 314B

123456789101112
  1. export function getDefaultContext (props, fields) {
  2. const clone = {}
  3. if (Array.isArray(fields)) {
  4. fields.forEach((key) => {
  5. const prop = props[key]
  6. clone[key] = typeof prop === 'object'
  7. ? prop.value
  8. : prop
  9. })
  10. }
  11. return clone
  12. }