<template>
  <div class="role-list">
    <el-row :gutter="100">
      <el-col :span="11" v-for="(item,index) in roleData" :key="index">
        <div class="role-item">
          <div class="left">
            <div class="avatar">
              <img src="@/assets/role.png" alt="">
            </div>
            <div class="role-info">
              <p>{{item.rolename}}</p>
              <p>{{item.remarks}}</p>
              <p>创建人：{{item.createby}}</p>
            </div>
          </div>
          <div class="right">
            <slot name="icon" :data="item"></slot>
            <slot name="remove" :data="item"></slot>
          </div>
        </div>
    </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: '',
  data () {
    return {
    };
  },
  props:['roleData'],
  computed: {
  },
  watch: {
  },
  methods: {},
};
</script>

<style scoped>
*{
  box-sizing: border-box;
}
.role-list {
  margin: 30px 50px 0 50px;
  display: flex;
  flex-wrap: wrap;
}
.role-list .role-item {
  width: 380px;
  height: 114px;
  background: #ffffff;
  border-radius: 4px 4px 4px 4px;
  border: 1px solid #cccccc;
  display: flex;
  justify-content: space-between;
  padding: 16px 30px 16px 20px;
  align-items: center;
  transition: box-shadow 0.1s ease-in;
  margin: 0 56px 30px 0;
  cursor: pointer;
}
.role-list .role-item:hover {
  box-shadow: 0px 5px 10px 1px rgba(0, 0, 0, 0.16);
}
.role-list .role-item .left {
  display: flex;
  align-items: center;
}
.role-list .role-item .left .avatar {
  width: 64px;
  height: 58px;
}
.role-list .role-item .left .avatar img {
  width: 100%;
  height: 100%;
}
.role-list .role-item .left .role-info {
  margin-left: 20px;
}
.role-list .role-item .left .role-info p {
  margin-bottom: 10px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-list .role-item .left .role-info p:nth-child(1) {
  font-size: 16px;
  font-weight: bold;
  color: #333333;
}
.role-list .role-item .left .role-info p:nth-child(1) span {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  margin-left: 30px;
}
.role-list .role-item .left .role-info p:nth-child(2) {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
}
.role-list .role-item .left .role-info p:nth-child(3) {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
}
.role-list .role-item .right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
</style>
