//合并对象 public extend(obj1: object, obj2: object) { for (var obj in obj2) { obj1[obj] = obj2[obj]; } return obj1; }