fix: truncate long client warehouse fields
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user