interface QuenchAddParam { id: number; // 属性id value: number; // 增加的值 } export class QuenchLogParam { times: number; // 第几次 isCriticle: boolean; // 是否暴击 add: QuenchAddParam[]; constructor(isCriticle: boolean, add: Map) { this.isCriticle = isCriticle; let arr: QuenchAddParam[] = []; for(let [id, value] of add) { arr.push({ id, value }); } this.add = arr; } setTimes(times: number) { this.times = times; } }