Detail.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <detail
  3. :on-manager="onManager"
  4. :data="data"
  5. :base-info="baseInfo"
  6. :extra-info="extraInfo" />
  7. </template>
  8. <script>
  9. export default {
  10. name: 'SshProxyDetail',
  11. props: {
  12. data: {
  13. type: Object,
  14. required: true,
  15. },
  16. onManager: {
  17. type: Function,
  18. required: true,
  19. },
  20. columns: Array,
  21. },
  22. data () {
  23. return {
  24. baseInfo: [
  25. {
  26. field: 'intranet_ip_addr',
  27. title: this.$t('network.ssh-proxy.intranet_ip_addr'),
  28. minWidth: 120,
  29. slots: {
  30. default: ({ row }) => {
  31. return [<div>
  32. <list-body-cell-wrap hide-field copy field='intranet_ip_addr' row={row}>
  33. <span style={{ color: '#53627C' }}>{ row.intranet_ip_addr || '-' }</span>
  34. </list-body-cell-wrap>
  35. </div>]
  36. },
  37. },
  38. },
  39. {
  40. field: 'host',
  41. title: this.$t('network.ssh-proxy.host'),
  42. minWidth: 120,
  43. slots: {
  44. default: ({ row }) => {
  45. return [<div>
  46. <list-body-cell-wrap hide-field copy field='host' row={row}>
  47. <span style={{ color: '#53627C' }}>{ row.host || '-' }</span>
  48. </list-body-cell-wrap>
  49. </div>]
  50. },
  51. },
  52. },
  53. { field: 'port', title: this.$t('network.ssh-proxy.port') },
  54. ],
  55. extraInfo: [],
  56. }
  57. },
  58. }
  59. </script>