import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'oilType'
})
export class OilTypePipe implements PipeTransform {

    transform(value: number): string {
        switch (value) {
            case 1:
                return '汽油';
            case 2:
                return '柴油';
            case 3:
                return '天然气';
        }
    }
}
