vipcolumns.js 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import { getCopyWithContentTableColumn, getTimeTableColumn } from '@/utils/common/tableColumn'
  2. import i18n from '@/locales'
  3. export default {
  4. created () {
  5. this.columns = [
  6. getCopyWithContentTableColumn({ field: 'ip_addr', title: i18n.t('compute.vip_address'), sortable: true }),
  7. getCopyWithContentTableColumn({ field: 'ip6_addr', title: i18n.t('compute.vip_ipv6_address'), sortable: true }),
  8. getCopyWithContentTableColumn({ field: 'eip_addr', title: 'EIP', sortable: true }),
  9. {
  10. field: 'network_id',
  11. title: i18n.t('compute.text_106'),
  12. sortable: true,
  13. showOverflow: 'ellipsis',
  14. minWidth: 100,
  15. slots: {
  16. default: ({ row }, h) => {
  17. const ret = [
  18. <list-body-cell-wrap copy row={row} field="network" hideField={ true }>
  19. <side-page-trigger onTrigger={ () => this.handleOpenNetworkDetail(row.network_id) }>{ row.network }</side-page-trigger>
  20. </list-body-cell-wrap>,
  21. ]
  22. return ret
  23. },
  24. },
  25. },
  26. getTimeTableColumn({
  27. field: 'created_at',
  28. title: this.$t('compute.text_722'),
  29. }),
  30. ]
  31. },
  32. }