<template>
  <el-dropdown
    placement="bottom"
    @command="clickCommand"
  >
    <el-button
      class="el-dropdown-link drop_down"
      style="cursor: pointer;"
      :size="size"
    >
      <span class="el-dropdown-link">{{ value }}</span>
      <i class="el-icon-arrow-down el-icon--right" />
    </el-button>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item
        v-for="(item,index) in options"
        :key="index"
        :command="item"
      >{{ item.name }}</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
export default {
  name: 'BugDropDown',
  props: {
    value: {
      type: String,
      default: null
    },
    options: {
      type: Array,
      default() {
        return []
      }
    },
    size: {
      type: String,
      default: 'medium'
    }
  },
  methods: {
    getName() {

    },
    clickCommand(item) {
      this.$emit('command', item)
    }
  }
}
</script>

<style>

</style>
