<template>
  <div class="tableInner">
    <el-select v-model="list[itemProp]" placeholder="请选择" style="width: 100%;" @change="changeSelect">
      <el-option
        v-for="item in getDictDatas(DICT_TYPE.TABLE_NAME)"
        :key="item.value"
        :label="item.label"
        :value="item.value">
      </el-option>
    </el-select>
  </div>
</template>
<script>
export default {
  name: 'SelectArea',
  props: {
    injectData: {
      type: Object,
      default: () => ({})
    },
    itemProp: {
      type: String
    }
  },
  data() {
    return {
      list: this.injectData
    }
  },
  methods: {
    changeSelect() {
      console.log(this.list)
      this.$emit('emitData', this.list)
    }
  }
}
</script>
<style scoped>
.tableInner .el-input__inner {
  border: none;
  padding: 0;
  height: 33px;
}
</style>