Browse Source

fix: remove v-bind in style

pull/6360/head
DarkPhoenix2704 1 year ago
parent
commit
8714e8684b
  1. 18
      packages/nc-gui/components/smartsheet/Cell.vue

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

@ -182,9 +182,6 @@ function initIntersectionObserver() {
})
}
const numberInputAlignment = computed(() => {
return isEditColumnMenu.value ? 'left' : 'right'
})
// observe the cell when it is mounted
onMounted(() => {
initIntersectionObserver()
@ -204,10 +201,11 @@ onUnmounted(() => {
:class="[
`nc-cell-${(column?.uidt || 'default').toLowerCase()}`,
{ 'text-brand-500': isPrimary(column) && !props.virtual && !isForm },
{ 'nc-grid-numeric-cell': isGrid && !isForm && isNumericField && !isExpandedFormOpen },
{ 'nc-grid-numeric-cell-right': isGrid && isNumericField && !isEditColumnMenu && !isForm && !isExpandedFormOpen },
{
'h-[40px]': !props.editEnabled && isForm && !isSurveyForm && !isAttachment(column) && !props.virtual,
},
{ 'nc-grid-numeric-cell-left': (isForm && isNumericField && isExpandedFormOpen) || isEditColumnMenu },
]"
@keydown.enter.exact="navigate(NavigateDir.NEXT, $event)"
@keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)"
@ -263,10 +261,16 @@ onUnmounted(() => {
</template>
<style scoped lang="scss">
.nc-grid-numeric-cell {
text-align: v-bind(numberInputAlignment);
.nc-grid-numeric-cell-left {
text-align: left;
:deep(input) {
text-align: left;
}
}
.nc-grid-numeric-cell-right {
text-align: right;
:deep(input) {
text-align: v-bind(numberInputAlignment);
text-align: right;
}
}
</style>

Loading…
Cancel
Save