mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 23:11:43 +01:00
fix(Button): inherit nuxt link props without breaking nuxt-component-meta
Resolves #578
This commit is contained in:
@@ -24,6 +24,7 @@ import UIcon from '../elements/Icon.vue'
|
||||
import ULink from '../elements/Link.vue'
|
||||
import { useUI } from '../../composables/useUI'
|
||||
import { mergeConfig } from '../../utils'
|
||||
import { nuxtLinkProps } from '../../utils/nuxt-link'
|
||||
import { useInjectButtonGroup } from '../../composables/useButtonGroup'
|
||||
import type { ButtonColor, ButtonSize, ButtonVariant, Strategy } from '../../types'
|
||||
// @ts-expect-error
|
||||
@@ -39,6 +40,7 @@ export default defineComponent({
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
...nuxtLinkProps,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'button'
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<script lang="ts">
|
||||
import { isEqual } from 'ohash'
|
||||
import { defineComponent } from 'vue'
|
||||
import { NuxtLink } from '#components'
|
||||
import { nuxtLinkProps } from '../../utils/nuxt-link'
|
||||
|
||||
export default defineComponent({
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
...NuxtLink.props,
|
||||
...nuxtLinkProps,
|
||||
as: {
|
||||
type: String,
|
||||
default: 'button'
|
||||
|
||||
Reference in New Issue
Block a user