Link.vue 367 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <a
  3. :class="[
  4. 'link',
  5. disabled && 'cursor-not-allowed',
  6. underline && !disabled && 'underline'
  7. ]"
  8. :href="disabled ? null : href"
  9. >
  10. <slot />
  11. </a>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. underline: {
  17. type: Boolean,
  18. default: false
  19. },
  20. href: String,
  21. disabled: Boolean
  22. }
  23. }
  24. </script>