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.2 kB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. <a class="name" :href="`/${item.Name}`" :title="item.Name">
  12. <img class="avatar" :src="item.RelAvatarLink">
  13. <div class="name-c"><span>{{ item.Name }}</span></div>
  14. </a>
  15. </div>
  16. <div class="item-r">
  17. <i class="ri-user-2-line" style="color:rgb(250, 140, 22);margin-right:4px;"></i>
  18. <span>{{ item.NumMembers }}</span>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import { getActiveOrgs } from '~/apis/modules/repos';
  27. export default {
  28. name: "ActiveOrgs",
  29. props: {},
  30. components: {},
  31. data() {
  32. return {
  33. list: [],
  34. };
  35. },
  36. methods: {},
  37. mounted() {
  38. getActiveOrgs().then(res => {
  39. res = res.data;
  40. if (res.Code == 0) {
  41. this.list = res.Data.Orgs || [];
  42. } else {
  43. this.list = [];
  44. }
  45. }).catch(err => {
  46. console.log(err);
  47. this.list = [];
  48. });
  49. },
  50. };
  51. </script>
  52. <style scoped lang="less">
  53. .title {
  54. height: 43px;
  55. border-color: rgba(16, 16, 16, 0.05);
  56. border-width: 1px 0px;
  57. border-style: solid;
  58. display: flex;
  59. align-items: center;
  60. font-size: 18px;
  61. color: rgba(47, 9, 69, 0.74);
  62. 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");
  63. }
  64. .content {
  65. padding: 6px 0;
  66. }
  67. .item {
  68. display: flex;
  69. align-items: center;
  70. height: 48px;
  71. padding: 0 8px;
  72. font-size: 14px;
  73. color: rgba(16, 16, 16, 1);
  74. }
  75. .item>div {
  76. display: flex;
  77. align-items: center;
  78. }
  79. .item-l {
  80. flex: 1;
  81. overflow: hidden;
  82. a {
  83. display: flex;
  84. align-items: center;
  85. overflow: hidden;
  86. }
  87. }
  88. .item-r {
  89. width: 80px;
  90. justify-content: flex-end;
  91. }
  92. .item .avatar {
  93. width: 32px;
  94. height: 32px;
  95. border-radius: 50%;
  96. margin-right: 10px;
  97. }
  98. .item .name-c {
  99. flex: 1;
  100. overflow: hidden;
  101. width: 100%;
  102. text-overflow: ellipsis;
  103. white-space: nowrap;
  104. }
  105. .item .name {
  106. color: rgba(16, 16, 16, 1);
  107. &:hover {
  108. opacity: 0.8;
  109. }
  110. }
  111. </style>