<template>
  <div>
    <el-select v-model="select_val" multiple  @change="handleChange" placeholder="请选择">
      <el-option
        v-for="item in options"
        :key="item.uid"
        :label="item.real_name"
        :value="item.uid">
      </el-option>
    </el-select>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        select_val: [],
        options: []
      }
    },
    props: {
      change:{
        type: Function,
      },
      value:{

      }
    },
    mounted() {
      this.select_val = this.value;
      this.getCateGory()
    },
    methods: {
      handleChange(value) {
        this.$emit('input',value);
        if(typeof(this.change)=="function")
        {
          this.change(value);
        }
      },
      async getCateGory() {
        const res = await this.$post('/uapi/pub/list/admin/admin_user/list')
        this.options = res.data
      }
    }
  }
</script>

<style scoped>
  .screenfull-svg {
    display: inline-block;
    cursor: pointer;
    fill: #5a5e66;;
    width: 20px;
    height: 20px;
    vertical-align: 10px;
  }
</style>
