<template>
<div style="width:100%;height:100%;">
      <el-select v-model="value_inner" placeholder="请选择">
        <el-option
          v-for="item in selcetOptions"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>
</div>

</template>
<script>
export default {
  name: 'commonSelect',
  props: {
    setOptions: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  watch: {
    setOptions: {
      handler: function(newVal, oldVal) {
        this.drowSelect(newVal)
      },
      deep: true
    }
  },
  data() {
    return {
      value_inner: '',
      selcetOptions: []
    }
  },
  created() {
  },

  mounted() {
    this.drowSelect(this.setOptions)
  },
  methods: {
    drowSelect(data) {
      this.selcetOptions = data.sourceData
    }

  }
}
</script>
<style scoped>
</style>
