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 // observe the cell when it is mounted
onMounted(() => { onMounted(() => {
initIntersectionObserver() initIntersectionObserver()
@ -204,10 +201,11 @@ onUnmounted(() => {
:class="[ :class="[
`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, `nc-cell-${(column?.uidt || 'default').toLowerCase()}`,
{ 'text-brand-500': isPrimary(column) && !props.virtual && !isForm }, { '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, '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.enter.exact="navigate(NavigateDir.NEXT, $event)"
@keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)" @keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)"
@ -263,10 +261,16 @@ onUnmounted(() => {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.nc-grid-numeric-cell { .nc-grid-numeric-cell-left {
text-align: v-bind(numberInputAlignment); text-align: left;
:deep(input) {
text-align: left;
}
}
.nc-grid-numeric-cell-right {
text-align: right;
:deep(input) { :deep(input) {
text-align: v-bind(numberInputAlignment); text-align: right;
} }
} }
</style> </style>

Loading…
Cancel
Save