Browse Source
fix: fixed the icon defect which cause to langauge button can not be clicked (#8184)
pull/8185/head
Harold Zhang
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
4 deletions
-
packages/@core/ui-kit/shadcn-ui/src/components/button/icon-button.vue
|
|
|
@ -12,7 +12,7 @@ import VbenButton from './button.vue'; |
|
|
|
interface Props extends VbenButtonProps { |
|
|
|
class?: any; |
|
|
|
disabled?: boolean; |
|
|
|
onClick?: (() => void)[] | (() => void); |
|
|
|
onClick?: ((e?: MouseEvent) => void)[] | ((e?: MouseEvent) => void); |
|
|
|
tooltip?: string; |
|
|
|
tooltipDelayDuration?: number; |
|
|
|
tooltipSide?: 'bottom' | 'left' | 'right' | 'top'; |
|
|
|
@ -31,13 +31,13 @@ const slots = useSlots(); |
|
|
|
|
|
|
|
const showTooltip = computed(() => !!slots.tooltip || !!props.tooltip); |
|
|
|
|
|
|
|
function handleClick() { |
|
|
|
function handleClick(e: MouseEvent) { |
|
|
|
if (Array.isArray(props.onClick)) { |
|
|
|
for (const fn of props.onClick) { |
|
|
|
fn?.(); |
|
|
|
fn?.(e); |
|
|
|
} |
|
|
|
} else { |
|
|
|
props.onClick?.(); |
|
|
|
props.onClick?.(e); |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|