<template>
  <div>
    <op :item-data="itemData" v-if="itemData.params.type == 'OPENSTACK'" ref="disk"></op>
    <vc :item-data="itemData" v-else-if="itemData.params.type == 'VMWARE'" ref="disk"></vc>
    <sf :item-data="itemData" v-else-if="itemData.params.type == 'SANGFOR'" ref="disk"></sf>
    <public-disk :item-data="itemData" v-else ref="disk"></public-disk>
  </div>
</template>

<script>
import { getSpecValue } from 'views/resource-apply/utils/index'
import op from './op.vue'
import vc from './vc.vue'
import sf from './sf.vue'
import publicDisk from './public.vue'
export default {
  components: { op, vc, sf, publicDisk },
  props: {
    itemData: {
      type: Object
    }
  },
  data() {
    return {}
  },
  methods: {
    ok() {
      const data = this.$refs.disk.ok()
      return data
    },
    getApplyData() {
      return this.$refs.disk.getApplyData()
    }
  }
}
</script>

<style lang="scss" scoped>
.w {
  width: 100px !important;
}
.add-border {
  padding: 2px;
  cursor: pointer;
  border: 1px dashed black;
  text-align: center;
}
</style>
