mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 19:17:04 +00:00
* fix(nc-gui): update kanban view stack ui * feat(nc-gui): add collapse all stack option * fix(nc-gui): add empty stack placeholder * fix(nc-gui): add loading state support for ncSwitch * fix(nc-gui): swap edit card and stacked by toolbar menu * fix(nc-gui): update stacked by toolbar menu * fix(nc-gui): update kanban view height * fix(nc-gui): add stack bg color * feat(nc-gui): add support to hide empty stack * fix(nc-gui): stack loader issue * fix(nc-gui): checkbox alignment in kanban view * fix(nc-gui): update stack drag handler and hide it if user does not have permission * fix(nc-gui): stack title overflow issue * fix(nc-gui): allow inline rename stack * fix(nc-gui): advance color picker tab warnings * fix(nc-gui): rename stack option issues * fix(nc-gui): small changes * fix(nc-gui): review changes * feat(nc-gui): add new stack support * fix(nc-gui): small changes * fix(nc-gui): add loading state for rename & add new stack * fix(nc-gui): reduce width of stack * fix(nc-gui): make ncSwitch placement prop optional * fix(nc-gui): some review changes * fix(nc-gui): remove only from test * fix(nc-gui): add error handling part in kanban stack update * fix(nc-gui): update localstate while updating kanban stack meta * fix(nc-gui): some review changes * fix(nc-gui): add expand all stack option * fix(nc-gui): add condition to append new stack obj * fix(nc-gui): update card field label style * fix(nc-gui): remove top & bottom padding from stack * fix(nc-gui): drag stack test update * fix(nc-gui): console warning issues * text(nc-gui): update kanban view test * fix(nc-gui): remove last added empty row from stack if it is not saved * fix(nc-gui): duplicate column insert issue on rename stack * fix(nc-gui): update field menu * fix(nc-gui): add new stack duplicate issue * feat(nc-gui): add expand record option in context menu of gallery * fix(nc-gui): delete record fail issue #3111 * fix(nc-gui): hide grouping field by default in kanban view * chore(nc-gui): lint * fix(nc-gui): ui review changes * fix(nc-gui): select option focus issue in edit state * fix(nc-gui): add bottom border for stack * fix(nc-gui): ui review changes * fix(nc-gui): update color picker btn text from select option * fix(nc-gui): delete default value stack #8212 * fix(nc-gui): stack data offset an drag card issue * chore(nc-gui): lint
34 lines
920 B
Vue
34 lines
920 B
Vue
<script lang="ts" setup>
|
|
import type { TooltipPlacement } from 'ant-design-vue/es/tooltip'
|
|
|
|
interface Props {
|
|
placement?: TooltipPlacement
|
|
length?: number
|
|
}
|
|
|
|
const { placement = 'bottom', length = 20 } = defineProps<Props>()
|
|
|
|
const text = ref<HTMLDivElement>()
|
|
|
|
const enableTooltip = computed(() => text.value?.textContent?.length && text.value?.textContent?.length > length)
|
|
|
|
const shortName = computed(() =>
|
|
text.value?.textContent?.length && text.value?.textContent.length > length
|
|
? `${text.value?.textContent?.substr(0, length - 3)}...`
|
|
: text.value?.textContent,
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<NcTooltip v-if="enableTooltip" :placement="placement">
|
|
<template #title>
|
|
<slot />
|
|
</template>
|
|
<div class="w-full">{{ shortName }}</div>
|
|
</NcTooltip>
|
|
<div v-else class="w-full" data-testid="truncate-label">
|
|
<slot />
|
|
</div>
|
|
<div ref="text" class="hidden"><slot /></div>
|
|
</template>
|