fix: fixed the icon defect which cause to langauge button can not be clicked (#8184)
This commit is contained in:
@@ -12,7 +12,7 @@ import VbenButton from './button.vue';
|
|||||||
interface Props extends VbenButtonProps {
|
interface Props extends VbenButtonProps {
|
||||||
class?: any;
|
class?: any;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
onClick?: (() => void)[] | (() => void);
|
onClick?: ((e?: MouseEvent) => void)[] | ((e?: MouseEvent) => void);
|
||||||
tooltip?: string;
|
tooltip?: string;
|
||||||
tooltipDelayDuration?: number;
|
tooltipDelayDuration?: number;
|
||||||
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
||||||
@@ -31,13 +31,13 @@ const slots = useSlots();
|
|||||||
|
|
||||||
const showTooltip = computed(() => !!slots.tooltip || !!props.tooltip);
|
const showTooltip = computed(() => !!slots.tooltip || !!props.tooltip);
|
||||||
|
|
||||||
function handleClick() {
|
function handleClick(e: MouseEvent) {
|
||||||
if (Array.isArray(props.onClick)) {
|
if (Array.isArray(props.onClick)) {
|
||||||
for (const fn of props.onClick) {
|
for (const fn of props.onClick) {
|
||||||
fn?.();
|
fn?.(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
props.onClick?.();
|
props.onClick?.(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user