diff --git a/src/app/pipes/recharge-pipe/platform.pipe.ts b/src/app/pipes/recharge-pipe/platform.pipe.ts new file mode 100644 index 0000000..e906d8d --- /dev/null +++ b/src/app/pipes/recharge-pipe/platform.pipe.ts @@ -0,0 +1,19 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'platform' +}) +export class PlatformPipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 1: + return '尖椒'; + case 2: + return '龙阅'; + case 3: + return '城宇'; + } + } + +}