mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 05:31:24 +00:00
* Fix customer dropdown * Fix #250
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="whitespace-normal">
|
||||
<BaseCustomTag :tag="tag" :title="text" class="line-clamp-1">
|
||||
<BaseCustomTag :tag="tag" :title="props.text" class="line-clamp-1">
|
||||
{{ displayText }}
|
||||
</BaseCustomTag>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue"
|
||||
|
||||
@@ -25,13 +26,12 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const { text, length } = props;
|
||||
|
||||
const displayText = computed(() => {
|
||||
if (length) {
|
||||
return text.length <= length ? text : `${text.substring(0, length)}...`;
|
||||
if (props.length) {
|
||||
return props.text.length <= props.length
|
||||
? props.text
|
||||
: `${props.text.substring(0, props.length)}...`
|
||||
}
|
||||
return text;
|
||||
});
|
||||
|
||||
return props.text
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user