Browse Source

fix: class bug

pull/6540/head
DarkPhoenix2704 1 year ago
parent
commit
1d8c68f37d
  1. 10
      packages/nc-gui/components/smartsheet/details/Fields.vue

10
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -88,7 +88,7 @@ const getFieldOrder = (field?: TableExplorerColumn) => {
const fields = computed<TableExplorerColumn[]>({ const fields = computed<TableExplorerColumn[]>({
get: () => { get: () => {
const x = (meta.value?.columns as ColumnType[]) const x = ((meta.value?.columns as ColumnType[]) ?? [])
.filter((field) => !field.fk_column_id && !isSystemColumn(field)) .filter((field) => !field.fk_column_id && !isSystemColumn(field))
.concat(newFields.value) .concat(newFields.value)
.sort((a, b) => { .sort((a, b) => {
@ -614,12 +614,12 @@ onMounted(async () => {
</div> </div>
</div> </div>
<div class="flex flex-row rounded-lg border-1 border-gray-200"> <div class="flex flex-row rounded-lg border-1 border-gray-200">
<div class="nc-scrollbar-md !overflow-auto w-full h-[calc(100vh-(var(--topbar-height)*3.85))] flex-grow-1"> <div class="nc-scrollbar-md !overflow-auto w-full flex-grow-1 nc-fields-height">
<Draggable v-model="fields" item-key="id" @change="onMove($event)"> <Draggable v-model="fields" item-key="id" @change="onMove($event)">
<template #item="{ element: field }"> <template #item="{ element: field }">
<div <div
v-if="field.title.toLowerCase().includes(searchQuery.toLowerCase()) && !field.pv" v-if="field.title.toLowerCase().includes(searchQuery.toLowerCase()) && !field.pv"
class="flex px-2 hover:bg-gray-100 first:rounded-t-lg border-b-1 border-gray-200 pl-5 group" class="flex px-2 hover:bg-gray-100 first:rounded-t-lg border-b-1 last:rounded-b-none border-gray-200 pl-5 group"
:class="` ${compareCols(field, activeField) ? 'selected' : ''}`" :class="` ${compareCols(field, activeField) ? 'selected' : ''}`"
@click="changeField(field, $event)" @click="changeField(field, $event)"
> >
@ -862,4 +862,8 @@ onMounted(async () => {
.slide-fade-leave-to { .slide-fade-leave-to {
opacity: 0; opacity: 0;
} }
.nc-fields-height {
height: calc(100vh - (var(--topbar-height) * 3.6));
}
</style> </style>

Loading…
Cancel
Save