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