<template>
  <el-row>
    <el-col v-for="(user, index) in userList" :key="index" :md="1" :sm="3" :xs="3">
      <router-link target="_blank" :to="`/user/` + user.userIdStr">
        <el-avatar>
          <el-image :src="user.avatarUrl" />
        </el-avatar>
      </router-link>
    </el-col>
  </el-row>
</template>

<script>
import { getUserAvatarList } from '@/api/admin'

export default {
  name: 'AdminRole',
  data() {
    return {
      userList: []
    }
  },
  created() {
  },
  methods: {
    getData() {
      getUserAvatarList().then(resp => {
        if (resp.code === 0) {
          this.userList = resp.data
        } else {
          this.$message.error(resp.msg)
        }
      })
    }
  }
}
</script>

<style scoped>
</style>
