vp-api-external.vue 473 B

123456789101112131415161718192021222324252627282930313233
  1. <script setup lang="ts">
  2. import VpLink from '../common/vp-link.vue'
  3. defineProps({
  4. text: {
  5. type: String,
  6. required: true,
  7. },
  8. url: {
  9. type: String,
  10. required: true,
  11. },
  12. prefix: {
  13. type: String,
  14. default: '',
  15. },
  16. })
  17. </script>
  18. <template>
  19. <slot>
  20. <span v-if="prefix" class="mr-1">{{ prefix }}</span>
  21. <VpLink :href="url">
  22. {{ text }}
  23. </VpLink>
  24. </slot>
  25. </template>
  26. <style scoped>
  27. :deep(.el-icon) {
  28. font-size: 18px;
  29. }
  30. </style>