Skip to content

Commit

Permalink
resolving NuxtLinkcomponent properly (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephiescastle authored Sep 5, 2024
1 parent 5b69aa9 commit 9418a27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/vue/src/components/BaseButton/BaseButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { defineComponent, resolveComponent } from 'vue'
interface Variants {
[key: string]: string
Expand Down Expand Up @@ -54,11 +54,11 @@ export default defineComponent({
},
emits: ['click'],
computed: {
tag(): string {
tag() {
if (this.disabled) {
return 'button'
} else if (this.to) {
return 'nuxt-link'
return resolveComponent('NuxtLink')
} else if (this.href) {
return 'a'
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/components/BlockRelatedLinks/RelatedLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</component>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { defineComponent, resolveComponent } from 'vue'
import IconArrow from './../Icons/IconArrow.vue'
import IconDownload from './../Icons/IconDownload.vue'
import IconExternal from './../Icons/IconExternal.vue'
Expand Down Expand Up @@ -59,7 +59,7 @@ export default defineComponent({
computed: {
tag() {
if (this.to) {
return 'nuxt-link'
return resolveComponent('NuxtLink')
} else {
return 'a'
}
Expand Down

0 comments on commit 9418a27

Please sign in to comment.