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

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