From 9c73e0dc7485f12a205117e7d518a8644594e116 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 6 Aug 2022 16:08:37 +0800 Subject: [PATCH] feat(gui-v2): add IsFormInj and disable header menu for form view --- .../nc-gui-v2/components/smartsheet-header/Cell.vue | 10 ++++++---- .../components/smartsheet-header/VirtualCell.vue | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-header/Cell.vue b/packages/nc-gui-v2/components/smartsheet-header/Cell.vue index b1bdbc047e..78223667ec 100644 --- a/packages/nc-gui-v2/components/smartsheet-header/Cell.vue +++ b/packages/nc-gui-v2/components/smartsheet-header/Cell.vue @@ -2,15 +2,17 @@ import type { ColumnType, TableType } from 'nocodb-sdk' import type { Ref } from 'vue' import { inject } from 'vue' -import { ColumnInj, MetaInj } from '~/context' +import { ColumnInj, IsFormInj, MetaInj } from '~/context' import { useProvideColumnCreateStore } from '#imports' const { column } = defineProps<{ column: ColumnType & { meta: any } }>() -provide(ColumnInj, column) - const meta = inject(MetaInj) +const isForm = inject(IsFormInj) + +provide(ColumnInj, column) + // instantiate column update store useProvideColumnCreateStore(meta as Ref, column) @@ -21,7 +23,7 @@ useProvideColumnCreateStore(meta as Ref, column) {{ column.title }}
- +
diff --git a/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue b/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue index 187b30cb6d..6dd88a767d 100644 --- a/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue +++ b/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue @@ -1,10 +1,14 @@