add: serve-area-filter - 當服務所有地區時,顯示為"全台"
| | |
| | | '~/plugins/filters/date.filter.ts', |
| | | '~/plugins/filters/age.filter.ts', |
| | | '~/plugins/filters/appointment-fail-reason.filter.ts', |
| | | '~/plugins/filters/serve-area.filter.ts', |
| | | ], |
| | | |
| | | // Auto import components: https://go.nuxtjs.dev/config-components |
| | |
| | | type="flex" |
| | | class="pam-paragraph"> |
| | | <UiField icon="company" label="æåå°å"> |
| | | {{ agentInfo.serveArea }} |
| | | {{ agentInfo.serveArea | toServeArea }} |
| | | </UiField> |
| | | </el-row> |
| | | |
¤ñ¹ï·sÀÉ®× |
| | |
| | | import { taiwanCities } from '~/shared/const/taiwan-cities'; |
| | | |
| | | import Vue from 'vue' |
| | | |
| | | Vue.filter('toServeArea', (value: string): string => { |
| | | |
| | | if (!value || typeof value !== 'string') { |
| | | return '--'; |
| | | } |
| | | |
| | | const serveAreaLength = value.split('ã').length; |
| | | |
| | | return serveAreaLength === taiwanCities.length |
| | | ? 'å
¨å°' |
| | | : value; |
| | | }) |