Browse Source

fix: set default row height to short

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4840/head
mertmit 2 years ago
parent
commit
8ccb128cba
  1. 2
      packages/nc-gui/components/cell/TextArea.vue
  2. 4
      packages/nc-gui/components/smartsheet/Cell.vue
  3. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  4. 2
      packages/nc-gui/components/virtual-cell/QrCode.vue
  5. 3
      packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

2
packages/nc-gui/components/cell/TextArea.vue

@ -28,6 +28,8 @@ const rowHeight = computed(() => {
return 4 return 4
case 3: case 3:
return 6 return 6
default:
return 1
} }
} }
}) })

4
packages/nc-gui/components/smartsheet/Cell.vue

@ -139,6 +139,8 @@ const rowHeight = computed(() => {
return 4 return 4
case 3: case 3:
return 6 return 6
default:
return 1
} }
} }
}) })
@ -150,7 +152,7 @@ const rowHeight = computed(() => {
:class="[ :class="[
`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, `nc-cell-${(column?.uidt || 'default').toLowerCase()}`,
{ 'text-blue-600': isPrimary(column) && !props.virtual && !isForm }, { 'text-blue-600': isPrimary(column) && !props.virtual && !isForm },
{ '!h-auto': !rowHeight || rowHeight === 1 }, { 'm-y-auto !h-auto': !rowHeight || rowHeight === 1 },
{ '!h-full': rowHeight && rowHeight !== 1 }, { '!h-full': rowHeight && rowHeight !== 1 },
]" ]"
@keydown.enter.exact="syncAndNavigate(NavigateDir.NEXT, $event)" @keydown.enter.exact="syncAndNavigate(NavigateDir.NEXT, $event)"

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -672,6 +672,8 @@ const rowHeight = computed(() => {
return 4 return 4
case 3: case 3:
return 6 return 6
default:
return 1
} }
} }
}) })

2
packages/nc-gui/components/virtual-cell/QrCode.vue

@ -26,6 +26,8 @@ const rowHeight = computed(() => {
return 4 return 4
case 3: case 3:
return 6 return 6
default:
return 1
} }
} }
}) })

3
packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

@ -35,7 +35,6 @@ const showBarcode = computed(() => barcodeValue?.value.length > 0 && !tooManyCha
const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = useShowNotEditableWarning() const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = useShowNotEditableWarning()
const rowHeight = computed(() => { const rowHeight = computed(() => {
if ((view.value?.view as GridType)?.row_height !== undefined) { if ((view.value?.view as GridType)?.row_height !== undefined) {
switch ((view.value?.view as GridType)?.row_height) { switch ((view.value?.view as GridType)?.row_height) {
@ -47,6 +46,8 @@ const rowHeight = computed(() => {
return 4 return 4
case 3: case 3:
return 6 return 6
default:
return 1
} }
} }
}) })

Loading…
Cancel
Save