fix: truncate long client warehouse fields

This commit is contained in:
2026-09-07 19:15:18 +08:00
parent cf79b8cd08
commit c611698aac
4 changed files with 30 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
<script setup lang="ts">
withDefaults(defineProps<{
value?: string | number | null
emptyText?: string
}>(), {
value: null,
emptyText: '—',
})
</script>
<template>
<span class="single-line-text" :title="value == null || value === '' ? undefined : String(value)">
{{ value == null || value === '' ? emptyText : value }}
</span>
</template>
<style scoped>
.single-line-text {
display: block;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>