fix(projects): fix pin-toggler toolTip zIndex

This commit is contained in:
Soybean 2024-03-27 22:32:35 +08:00
parent 6b5132c169
commit f89e6c0361
2 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,7 @@ const icon = computed(() => (props.pin ? 'mdi-pin-off' : 'mdi-pin'));
<ButtonIcon
:tooltip-content="pin ? $t('icon.pin') : $t('icon.unpin')"
tooltip-placement="bottom-start"
trigger-parent
:z-index="100"
>
<SvgIcon :icon="icon" />
</ButtonIcon>

View File

@ -17,13 +17,15 @@ interface Props {
tooltipContent?: string;
/** Tooltip placement */
tooltipPlacement?: PopoverPlacement;
zIndex?: number;
}
const props = withDefaults(defineProps<Props>(), {
class: 'h-36px text-icon',
icon: '',
tooltipContent: '',
tooltipPlacement: 'bottom'
tooltipPlacement: 'bottom',
zIndex: 98
});
interface ButtonProps {
@ -58,7 +60,7 @@ const cls = computed(() => {
</DefineButton>
<!-- define component end: Button -->
<NTooltip v-if="tooltipContent" :placement="tooltipPlacement" :z-index="98">
<NTooltip v-if="tooltipContent" :placement="tooltipPlacement" :z-index="zIndex">
<template #trigger>
<Button :class-name="cls" v-bind="$attrs">
<slot>