mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 04:37:57 +01:00
fix(Button): props specified more than once
This commit is contained in:
@@ -17,6 +17,11 @@ function onClick() {
|
|||||||
Button
|
Button
|
||||||
</UButton>
|
</UButton>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<UButton to="/">
|
||||||
|
Link
|
||||||
|
</UButton>
|
||||||
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<UButton disabled>
|
<UButton disabled>
|
||||||
Disabled
|
Disabled
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import { useComponentIcons } from '../composables/useComponentIcons'
|
|||||||
import { useButtonGroup } from '../composables/useButtonGroup'
|
import { useButtonGroup } from '../composables/useButtonGroup'
|
||||||
import UIcon from './Icon.vue'
|
import UIcon from './Icon.vue'
|
||||||
import ULink from './Link.vue'
|
import ULink from './Link.vue'
|
||||||
|
import { omit } from '../utils'
|
||||||
import { pickLinkProps } from '../utils/link'
|
import { pickLinkProps } from '../utils/link'
|
||||||
|
|
||||||
const props = defineProps<ButtonProps>()
|
const props = defineProps<ButtonProps>()
|
||||||
@@ -92,7 +93,7 @@ const ui = computed(() => button({
|
|||||||
:type="type"
|
:type="type"
|
||||||
:disabled="disabled || isLoading"
|
:disabled="disabled || isLoading"
|
||||||
:class="ui.base({ class: [props.class, props.ui?.base] })"
|
:class="ui.base({ class: [props.class, props.ui?.base] })"
|
||||||
v-bind="linkProps"
|
v-bind="omit(linkProps, ['type', 'disabled'])"
|
||||||
raw
|
raw
|
||||||
@click="onClickWrapper"
|
@click="onClickWrapper"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user