blocks:
- type: http
method: GET
fetchFn: |
return [
{ id: 1, type: 'HOTEL', type2: 'hotel', type3: 'HOTEL', type4: 'HOTEL' },
{ id: 2, type: 'PENSION', type2: 'pension', type3: 'PENSION', type4: 'PENSION' },
{ id: 3, type: 'RESORT', type2: 'resort', type3: 'RESORT', type4: 'RESORT' },
]
columns:
type:
formatFn: |
'$' + value
type2:
formatFn: |
_.capitalize(value || '')
type3:
formatFn: |
if (value == 'HOTEL') { return '호텔' }
if (value == 'PENSION') { return '펜션' }
if (value == 'RESORT') { return '리조트' }
type4:
formatFn: |
return {
HOTEL: '호텔',
PENSION: '펜션',
RESORT: '리조트'
}[value] || value