<template>
  <el-select filterable :value="value" @change="change" v-bind="$attrs">
    <el-option v-for="user in getUser" :key="user.id" :value="user.id" :label="user.nickname"></el-option>
  </el-select>
</template>

<script>
/**
 * 用户
 */
export default {
  name: "userSelect",
  inheritAttrs: false,
  props: {
    value: Number,
    allUsers: Array,
  },
  model: {
    prop: "value",
    event: "change",
  },
  data() {
    return {};
  },
  computed: {
    getUser() {
      return this.allUsers;
    },
  },
  methods: {
    change(val) {
      this.$emit("change", val);
    },
  },
};
</script>
