fix(nc-gui): date, year cell content truncate issue

This commit is contained in:
Ramesh Mane
2025-01-28 13:18:32 +00:00
parent ccb52c14be
commit 39e6f9b832
6 changed files with 24 additions and 42 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { dateFormats, timeFormats } from 'nocodb-sdk'
import dayjs from 'dayjs'
import { timeCellMaxWidthMap } from './utils'
interface Props {
modelValue?: string | null
@@ -47,20 +48,7 @@ const cellValue = computed(
)
const timeCellMaxWidth = computed(() => {
return {
[timeFormats[0]]: {
12: 'max-w-[85px]',
24: 'max-w-[65px]',
},
[timeFormats[1]]: {
12: 'max-w-[100px]',
24: 'max-w-[80px]',
},
[timeFormats[2]]: {
12: 'max-w-[130px]',
24: 'max-w-[110px]',
},
}[timeFormat.value][parseProp(column.value.meta).is12hrFormat ? 12 : 24]
return timeCellMaxWidthMap?.[timeFormat.value]?.[parseProp(column.value.meta).is12hrFormat ? 12 : 24]
})
</script>
@@ -75,10 +63,3 @@ const timeCellMaxWidth = computed(() => {
</div>
</div>
</template>
<style scoped lang="scss">
.nc-cell-picker-datetime {
@apply text-[13px] leading-4;
font-weight: 500;
}
</style>