<template>
    <el-select :value="value+''" @change="$emit('change', $event)" @input="$emit('input', $event)" :multiple="multiple"  :placeholder="placeholder" clearable :disabled="disabled">
        <el-option :label="data.dictLabel" v-for="data in dataList" :key="data.dictValue" :value ="data.dictValue">{{data.dictLabel}}</el-option>
    </el-select>
</template>
<script>
import { getDictDataList } from '@/utils'
export default {
  name: 'RenSelect',
  data () {
    return {
      dataList:''
    }
  },
  created(){
    if(this.personFilter){
      this.dataList=getDictDataList(this.dictType,'touch')
    }else{
      this.dataList=getDictDataList(this.dictType)
    }
  },
  props: {
    value: [Number, String],
    dictType: String,
    placeholder: String,
    multiple:Boolean,
    disabled:Boolean,
    personFilter:Boolean
  },
}
</script>
