contributors.vue 887 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script setup lang="ts">
  2. import { computed } from 'vue'
  3. import _contributors from '@element-plus/metadata/dist/contributors.json'
  4. import VpLink from '../common/vp-link.vue'
  5. const props = defineProps<{ id: string }>()
  6. const contributors = computed(() =>
  7. _contributors[props.id]?.filter((c) => c.login !== 'renovate[bot]')
  8. )
  9. </script>
  10. <template>
  11. <div class="mb-4">
  12. <div class="flex flex-wrap gap-4 pt-2">
  13. <div v-for="c of contributors" :key="c.hash">
  14. <vp-link
  15. :href="`https://github.com/${c.login}`"
  16. class="flex gap-2 items-center link"
  17. no-icon
  18. >
  19. <img :src="c.avatar" class="w-8 h-8 rounded-full" />
  20. {{ c.name }}
  21. </vp-link>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <style lang="scss" scoped>
  27. .link {
  28. color: var(--text-color-light);
  29. &:hover {
  30. color: var(--brand-color);
  31. }
  32. }
  33. </style>