<template>
  <transition name="menu">
    <div class="select-dropdown" v-if="flagDrop">
      <ul>
        <template v-for="(item, index) in selectData">
          <li :key="index" @click="selectLang(index)">
            <span>{{item}}</span>
          </li>
        </template>
      </ul>
    </div>
  </transition>
</template>

<script>
export default {
  name: 'win-select',
  props: {
    selectData: Object,
    flagDrop: Boolean,
  },
  data() {
    return {
    };
  },
  watch: {
  },
  computed: {
  },
  methods: {
    selectLang(name) {
      this.$emit('on-change', name);
    },
  },
};
</script>
<style scoped>
  .menu-enter-active{
    transition: all 0.5s ease;
  }
  .menu-leave-active{
    transition: all 0.5s cubic-bezier(.42, 0, .58, 1);
  }
  .menu-enter, .menu-leave-to{
    transform: translateY(-10%);
    opacity: 0;
  }
  .select-dropdown{
    margin: 5px 0;
    padding: 5px 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 6px rgba(0,0,0,.2);
    transform-origin: center top 0;
    position: absolute;
    z-index: 900;
  }
  .select-dropdown ul li{
    padding: 7px 16px;
    clear: both;
    white-space: nowrap;
    list-style: none;
    cursor: pointer;
    line-height: normal;
  }
  .select-dropdown ul li span{
    color: #515a6e;
    font-size: 12px!important;
  }
  .select-dropdown ul li:hover span{
    color: #002684;
  }
</style>
