Browse Source

fix: deafult styles

pull/6343/head
sreehari jayaraj 1 year ago
parent
commit
de5433e741
  1. 12
      packages/nc-gui/components/cell/attachment/index.vue

12
packages/nc-gui/components/cell/attachment/index.vue

@ -43,7 +43,7 @@ const currentCellRef = inject(CurrentCellInj, dropZoneInjection.value)
const isLockedMode = inject(IsLockedInj, ref(false)) const isLockedMode = inject(IsLockedInj, ref(false))
const isExpandedForm = inject(IsExpandedFormOpenInj, ref()) const isExpandedForm = inject(IsExpandedFormOpenInj, ref(false))
const { isSharedForm } = useSmartsheetStoreOrThrow()! const { isSharedForm } = useSmartsheetStoreOrThrow()!
@ -200,8 +200,8 @@ const rowHeight = inject(RowHeightInj, ref())
<template v-if="visibleItems.length"> <template v-if="visibleItems.length">
<div <div
ref="sortableRef" ref="sortableRef"
:class="{ dragging }" :class="{ dragging, 'justify-center': !isExpandedForm }"
class="flex cursor-pointer justify-center items-center flex-wrap gap-2 py-1.5 scrollbar-thin-dull overflow-hidden mt-0 items-start" class="flex cursor-pointer items-center flex-wrap gap-2 py-1.5 scrollbar-thin-dull overflow-hidden mt-0 items-start"
:style="{ :style="{
maxHeight: isForm ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`, maxHeight: isForm ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`,
}" }"
@ -213,17 +213,17 @@ const rowHeight = inject(RowHeightInj, ref())
</template> </template>
<div v-if="isImage(item.title, item.mimetype ?? item.type)"> <div v-if="isImage(item.title, item.mimetype ?? item.type)">
<div <div
class="nc-attachment flex items-center justify-center" class="nc-attachment flex items-center flex-col flex-wrap justify-center"
:class="{ 'ml-2': active }" :class="{ 'ml-2': active }"
@click.stop="selectedImage = item" @click.stop="selectedImage = item"
> >
<LazyCellAttachmentImage <LazyCellAttachmentImage
class="h-7 w-7"
:alt="item.title || `#${i}`" :alt="item.title || `#${i}`"
:class="{ :class="{
'h-7.5 w-8.8': rowHeight === 1,
'h-11.5 w-12.8': rowHeight === 2, 'h-11.5 w-12.8': rowHeight === 2,
'h-16.8 w-20.8': rowHeight === 4, 'h-16.8 w-20.8': rowHeight === 4,
'h-20.8 w-30': rowHeight === 6 || isExpandedForm, 'h-20.8 !w-30': isExpandedForm || rowHeight === 6,
}" }"
:srcs="getPossibleAttachmentSrc(item)" :srcs="getPossibleAttachmentSrc(item)"
/> />

Loading…
Cancel
Save