Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(sql-editor): show tooltip when text truncated (#7736)

Liu Ji0271a86bb511
diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue b/frontend/src/views/sql-editor/TabList/TabItem/Label.vue
index 599c96b2de..2ea39c5f55 100644
--- a/frontend/src/views/sql-editor/TabList/TabItem/Label.vue
+++ b/frontend/src/views/sql-editor/TabList/TabItem/Label.vue
@@ -1,12 +1,16 @@
<template>
<div class="label">
- <span
+ <NEllipsis
class="name"
+ :tooltip="{
+ placement: 'top',
+ delay: 250,
+ }"
:class="state.editing && 'invisible'"
@dblclick="beginEdit"
>
{{ state.name }}
- </span>
+ </NEllipsis>
<input
v-if="state.editing"
@@ -21,6 +25,7 @@
</div>
</template>
<script lang="ts" setup>
+import { NEllipsis } from "naive-ui";
import { computed, nextTick, PropType, reactive, ref, watch } from "vue";
import { useSheetV1Store, useTabStore } from "@/store";
import type { TabInfo } from "@/types";