Newer
Older
KaiFengPC / src / utils / v3.js
@zhangdeliang zhangdeliang on 20 May 324 bytes 项目初始化
export function inheritAttr(source, target) {
  for (const key in source) {
    if (Object.hasOwnProperty.call(target, key)) {
      target[key] = source[key];
    }
  }
}

export function setEmpty(target) {
  for (const key in target) {
    if (Object.hasOwnProperty.call(target, key)) {
      target[key] = '';
    }
  }
}