如何将switch语句遍历对象优化的更精简
switch (this.active) { case 0: this.OrderState = 'Wait'; break; case 1: this.OrderState = 'Sent'; break; case 2: this.OrderState = 'Fail'; break; default: break; }
相关分类