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