保誠-保戶業務員媒合平台
Tomas
2021-11-30 5ca8f6e6e554696cb8add0fc91396b2d905b0d7a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Vue from 'vue'
 
Vue.filter('toAgeLabel', (value: string): string => {
 
  if (!value ||  typeof value !== 'string') {
    return '--';
  };
 
  const ageLabel = {
    'under_20': '20歲以下',
    '21-30': '21-30 歲',
    '31-40': '31-40 歲',
    '41-50': '41-50 歲',
    '46-55': '46-55 歲',
    '51-60': '51-60 歲',
    '61-70': '61-70 歲',
    'over_71': '71 歲以上'
  };
 
  return  ageLabel[value];
})