feat(welcome-screen): 连接描述截断时显示工具提示
This commit is contained in:
2 files changed
+55
-32
No files matched your search
@@ -8,6 +8,7 @@ const props = withDefaults(
|
||||
defineProps<{
|
||||
text: string;
|
||||
class?: HTMLAttributes["class"];
|
||||
tooltipClass?: HTMLAttributes["class"];
|
||||
side?: "top" | "right" | "bottom" | "left";
|
||||
sideOffset?: number;
|
||||
delay?: number;
|
||||
@@ -35,5 +36,8 @@ function isTooltipDisabled(): boolean {
|
||||
<span ref="textRef" :class="cn('truncate', props.class)">
|
||||
<slot>{{ text }}</slot>
|
||||
</span>
|
||||
<template v-if="tooltipClass" #content>
|
||||
<span :class="cn('block max-w-xs px-3 py-1.5', tooltipClass)">{{ text }}</span>
|
||||
</template>
|
||||
</LightTooltip>
|
||||
</template>
|
||||
Reference in new issue
Block a user