Detail.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div>
  3. <detail
  4. :on-manager="onManager"
  5. :data="data"
  6. :base-info="baseInfo"
  7. :is-edit-name="false"
  8. resource="storageclasses" />
  9. </div>
  10. </template>
  11. <script>
  12. import { getCopyWithContentTableColumn } from '@/utils/common/tableColumn'
  13. import { k8sStatusColumn } from '@K8S/utils/tableColumns'
  14. export default {
  15. name: 'K8sStorageclassDetail',
  16. props: {
  17. data: {
  18. type: Object,
  19. required: true,
  20. },
  21. onManager: {
  22. type: Function,
  23. required: true,
  24. },
  25. },
  26. data () {
  27. return {
  28. baseInfo: [
  29. getCopyWithContentTableColumn({ field: 'cluster', title: this.$t('k8s.text_19') }),
  30. k8sStatusColumn(),
  31. {
  32. field: 'isDefault',
  33. title: this.$t('k8s.text_359'),
  34. formatter: ({ cellValue }) => {
  35. return cellValue ? this.$t('k8s.text_360') : this.$t('k8s.text_361')
  36. },
  37. },
  38. {
  39. field: 'provisioner',
  40. title: this.$t('k8s.text_362'),
  41. },
  42. {
  43. field: 'creationTimestamp',
  44. title: this.$t('k8s.text_74'),
  45. formatter: ({ cellValue }) => {
  46. return this.$moment(cellValue).format()
  47. },
  48. },
  49. ],
  50. }
  51. },
  52. }
  53. </script>