|
|
@ -1,6 +1,6 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import type { ColumnType, TableType, ViewType } from 'nocodb-sdk' |
|
|
|
import type { ColumnType, TableType, ViewType } from 'nocodb-sdk' |
|
|
|
import { isVirtualCol } from 'nocodb-sdk' |
|
|
|
import { isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import Cell from '../Cell.vue' |
|
|
|
import Cell from '../Cell.vue' |
|
|
|
import VirtualCell from '../VirtualCell.vue' |
|
|
|
import VirtualCell from '../VirtualCell.vue' |
|
|
@ -46,14 +46,14 @@ const meta = toRef(props, 'meta') |
|
|
|
|
|
|
|
|
|
|
|
const fields = computedInject(FieldsInj, (_fields) => { |
|
|
|
const fields = computedInject(FieldsInj, (_fields) => { |
|
|
|
if (props.useMetaFields) { |
|
|
|
if (props.useMetaFields) { |
|
|
|
return meta.value.columns ?? [] |
|
|
|
return (meta.value.columns ?? []).filter((col) => !isSystemColumn(col)) |
|
|
|
} |
|
|
|
} |
|
|
|
return _fields?.value ?? [] |
|
|
|
return _fields?.value ?? [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
provide(MetaInj, meta) |
|
|
|
provide(MetaInj, meta) |
|
|
|
|
|
|
|
|
|
|
|
const { commentsDrawer, changedColumns, state: rowState } = useProvideExpandedFormStore(meta, row) |
|
|
|
const { commentsDrawer, changedColumns, state: rowState, isNew } = useProvideExpandedFormStore(meta, row) |
|
|
|
|
|
|
|
|
|
|
|
const { $api } = useNuxtApp() |
|
|
|
const { $api } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
|
@ -113,6 +113,7 @@ export default { |
|
|
|
<div class="w-[500px] mx-auto"> |
|
|
|
<div class="w-[500px] mx-auto"> |
|
|
|
<div v-for="col of fields" :key="col.title" class="mt-2 py-2" :class="`nc-expand-col-${col.title}`"> |
|
|
|
<div v-for="col of fields" :key="col.title" class="mt-2 py-2" :class="`nc-expand-col-${col.title}`"> |
|
|
|
<SmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" /> |
|
|
|
<SmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" /> |
|
|
|
|
|
|
|
|
|
|
|
<SmartsheetHeaderCell v-else :column="col" /> |
|
|
|
<SmartsheetHeaderCell v-else :column="col" /> |
|
|
|
|
|
|
|
|
|
|
|
<div class="!bg-white rounded px-1 min-h-[35px] flex items-center mt-2"> |
|
|
|
<div class="!bg-white rounded px-1 min-h-[35px] flex items-center mt-2"> |
|
|
@ -130,7 +131,7 @@ export default { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="nc-comments-drawer min-w-0 min-h-full max-h-full" :class="{ active: commentsDrawer }"> |
|
|
|
<div v-if="!isNew" class="nc-comments-drawer min-w-0 min-h-full max-h-full" :class="{ active: commentsDrawer }"> |
|
|
|
<div class="h-full"> |
|
|
|
<div class="h-full"> |
|
|
|
<Comments v-if="commentsDrawer" /> |
|
|
|
<Comments v-if="commentsDrawer" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|