Browse Source

fix: barcode cell alignment issue #7253

pull/7270/head
Ramesh Mane 11 months ago
parent
commit
262ef725bc
  1. 12
      packages/nc-gui/components/virtual-cell/barcode/Barcode.vue

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

@ -55,7 +55,7 @@ const rowHeight = inject(RowHeightInj, ref(undefined))
</a-modal>
<div
v-if="!tooManyCharsForBarcode"
class="flex ml-2 w-full items-center"
class="flex ml-2 w-full items-center barcode-wrapper"
:class="{
'justify-start': isExpandedFormOpen,
'justify-center': !isExpandedFormOpen,
@ -65,7 +65,7 @@ const rowHeight = inject(RowHeightInj, ref(undefined))
v-if="showBarcode && rowHeight"
:barcode-value="barcodeValue"
:barcode-format="barcodeMeta.barcodeFormat"
:custom-style="{ height: rowHeight ? `${rowHeight * 1.4}rem` : `1.4rem`, width: 40 }"
:custom-style="{ height: rowHeight ? `${rowHeight * 1.4}rem` : `1.4rem` }"
@on-click-barcode="showBarcodeModal"
>
<template #barcodeRenderError>
@ -98,3 +98,11 @@ const rowHeight = inject(RowHeightInj, ref(undefined))
{{ $t('msg.warning.nonEditableFields.barcodeFieldsCannotBeDirectlyChanged') }}
</div>
</template>
<style lang="scss" scoped>
.barcode-wrapper {
& > div {
@apply max-w-8.2rem;
}
}
</style>

Loading…
Cancel
Save