utils.js 516 B

1234567891011121314151617
  1. import i18n from '@/locales'
  2. export const chargeTypeColumn = () => {
  3. return {
  4. field: 'postpaid_status',
  5. title: i18n.t('compute.text_498'),
  6. width: 90,
  7. slots: {
  8. default: ({ row }, h) => {
  9. const chargeTypes = []
  10. if (row.postpaid_status === 'available') chargeTypes.push(i18n.t('billingType.postpaid'))
  11. if (row.prepaid_status === 'available') chargeTypes.push(i18n.t('billingType.prepaid'))
  12. return chargeTypes.map(val => <div>{ val }</div>)
  13. },
  14. },
  15. }
  16. }