mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
501 B
29 lines
501 B
<script setup lang="ts"> |
|
const props = defineProps<{ |
|
value?: string | number | null |
|
lines?: number |
|
}>() |
|
|
|
const wrapper = ref() |
|
|
|
const key = ref(0) |
|
|
|
onMounted(() => { |
|
const observer = new ResizeObserver(() => { |
|
key.value++ |
|
}) |
|
|
|
observer.observe(wrapper.value) |
|
}) |
|
</script> |
|
|
|
<template> |
|
<div ref="wrapper"> |
|
<text-clamp |
|
:key="key + props.value" |
|
class="w-full h-full break-all" |
|
:text="`${props.value || ' '}`" |
|
:max-lines="props.lines" |
|
/> |
|
</div> |
|
</template>
|
|
|