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
2 years ago
2 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. } else {
  41. this.list = [];
  42. }
  43. }).catch(err => {
  44. console.log(err);
  45. this.list = [];
  46. });
  47. },
  48. };
  49. </script>
  50. <style scoped lang="less">
  51. .title {
  52. height: 43px;
  53. border-color: rgba(16, 16, 16, 0.05);
  54. border-width: 1px 0px;
  55. border-style: solid;
  56. display: flex;
  57. align-items: center;
  58. font-size: 18px;
  59. color: rgba(47, 9, 69, 0.74);
  60. 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");
  61. }
  62. .content {
  63. padding: 6px 0;
  64. }
  65. .item {
  66. display: flex;
  67. align-items: center;
  68. height: 48px;
  69. padding: 0 8px;
  70. font-size: 14px;
  71. color: rgba(16, 16, 16, 1);
  72. }
  73. .item>div {
  74. display: flex;
  75. align-items: center;
  76. }
  77. .item-l {
  78. flex: 1;
  79. overflow: hidden;
  80. }
  81. .item-r {
  82. width: 80px;
  83. justify-content: flex-end;
  84. }
  85. .item .avatar {
  86. width: 32px;
  87. height: 32px;
  88. border-radius: 50%;
  89. margin-right: 10px;
  90. }
  91. .item .name-c {
  92. flex: 1;
  93. overflow: hidden;
  94. width: 100%;
  95. text-overflow: ellipsis;
  96. white-space: nowrap;
  97. }
  98. .item .name {
  99. color: rgba(16, 16, 16, 1);
  100. &:hover {
  101. opacity: 0.8;
  102. }
  103. }
  104. </style>