mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 06:16:52 +00:00
fix(nc-gui): date, year cell content truncate issue
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user