<template>
    <div style="min-width: 100px;width: 100%;">
      <el-select v-model="val">
        <el-option v-for="(item, index) in options" :value="item.id" :key="index" :label="$l(item ,'title')" ></el-option>
      </el-select>
    </div>
</template>

<script>
export default {
  name: "weight-select",
  props:{
    options:{
      type:Array,
      default:()=>[]
    },
    value:{
      type:[String,Number]
    }
  },
  created() {
    this.val = this.value;
  },
  data(){
    return{
      val:''
    }
  },
  watch:{
    val(){
      this.$emit('input', this.val)
    },
    value(val){
      this.val = val;
    }
  }
}
</script>

<style scoped>

</style>
