index.vue 927 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div>
  3. <page-header :title="$t('compute.text_113')" :tabs="tabOptions" :current-tab.sync="curTab" />
  4. <page-body>
  5. <component :is="curTab" :id="listId" />
  6. </page-body>
  7. </div>
  8. </template>
  9. <script>
  10. import PciList from '../pci/components/PciList'
  11. import GpuList from './components/List'
  12. export default {
  13. name: 'GPUIndex',
  14. components: {
  15. GpuList,
  16. PciList,
  17. },
  18. data () {
  19. return {
  20. listId: 'GpuList',
  21. curTab: 'gpu-list',
  22. }
  23. },
  24. computed: {
  25. tabOptions () {
  26. if (this.$store.getters?.globalSetting?.value?.productVersion === 'AI') {
  27. return [
  28. { label: this.$t('compute.pci.passthrough_device'), key: 'gpu-list' },
  29. ]
  30. }
  31. return [
  32. { label: this.$t('compute.pci.passthrough_device'), key: 'gpu-list' },
  33. { label: this.$t('compute.pci.passthrough_device_type'), key: 'pci-list' },
  34. ]
  35. },
  36. },
  37. }
  38. </script>