You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ActiveOrgs.vue 3.0 kB

3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div>
  3. <div class="container">
  4. <div class="title">
  5. <i style="margin-left:10px;margin-right:8px;font-size:20px;" class="ri-blaze-line"></i>
  6. <span>{{ $t('repos.activeOrganization') }}</span>
  7. </div>
  8. <div class="content">
  9. <div class="item" v-for="(item, index) in list" :key="index">
  10. <div class="item-l">
  11. <img class="avatar" :src="item.RelAvatarLink">
  12. <div class="name-c"><a class="name" :href="`/${item.Name}`" :title="item.Name">{{ item.Name }}</a></div>
  13. </div>
  14. <div class="item-r">
  15. <i class="ri-user-2-line" style="color:rgb(250, 140, 22);margin-right:4px;"></i>
  16. <span>{{ item.NumMembers }}</span>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import { getActiveOrgs } from '~/apis/modules/repos';
  25. export default {
  26. name: "ActiveOrgs",
  27. props: {},
  28. components: {},
  29. data() {
  30. return {
  31. list: [],
  32. };
  33. },
  34. methods: {},
  35. mounted() {
  36. getActiveOrgs().then(res => {
  37. res = res.data;
  38. if (res.Code == 0) {
  39. this.list = res.Data.Orgs || [];
  40. }
  41. }).catch(err => {
  42. console.log(err);
  43. });
  44. },
  45. };
  46. </script>
  47. <style scoped lang="less">
  48. .title {
  49. height: 43px;
  50. border-color: rgba(16, 16, 16, 0.05);
  51. border-width: 1px 0px;
  52. border-style: solid;
  53. display: flex;
  54. align-items: center;
  55. font-size: 18px;
  56. color: rgba(47, 9, 69, 0.74);
  57. background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(-1.007%2C%200.0010000000000001494%2C%20-0.000018400023883213844%2C%20-1.007%2C%201.003%2C%200.008)%22%3E%3Cstop%20stop-color%3D%22%23eee9da%22%20stop-opacity%3D%220%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23f3e7f7%22%20stop-opacity%3D%220.26%22%20offset%3D%220.29%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23d0e7ff%22%20stop-opacity%3D%220.3%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E");
  58. }
  59. .content {
  60. padding: 6px 0;
  61. }
  62. .item {
  63. display: flex;
  64. align-items: center;
  65. height: 48px;
  66. padding: 0 8px;
  67. font-size: 14px;
  68. color: rgba(16, 16, 16, 1);
  69. }
  70. .item>div {
  71. display: flex;
  72. align-items: center;
  73. }
  74. .item-l {
  75. flex: 1;
  76. overflow: hidden;
  77. }
  78. .item-r {
  79. width: 80px;
  80. justify-content: flex-end;
  81. }
  82. .item .avatar {
  83. width: 32px;
  84. height: 32px;
  85. border-radius: 50%;
  86. margin-right: 10px;
  87. }
  88. .item .name-c {
  89. flex: 1;
  90. overflow: hidden;
  91. width: 100%;
  92. text-overflow: ellipsis;
  93. white-space: nowrap;
  94. }
  95. .item .name {
  96. color: rgba(16, 16, 16, 1);
  97. &:hover {
  98. opacity: 0.8;
  99. }
  100. }
  101. </style>