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
parent
commit
f43de252b5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      packages/@core/ui-kit/shadcn-ui/src/components/button/icon-button.vue

8
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>

Loading…
Cancel
Save