From a0e8973cebc4730e57267669fb9b2928c4a8b6b0 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 9 Aug 2022 11:30:15 +0800 Subject: [PATCH] chore(gui-v2): lint --- .../smartsheet-header/VirtualCell.vue | 17 ++++++----------- .../nc-gui-v2/components/smartsheet/Form.vue | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue b/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue index 6f084dca5b..7e25049fe2 100644 --- a/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue +++ b/packages/nc-gui-v2/components/smartsheet-header/VirtualCell.vue @@ -5,24 +5,19 @@ import { toRef } from 'vue' import { $computed } from 'vue/macros' import type { Ref } from 'vue' import { useMetas } from '~/composables' -import { ColumnInj, MetaInj, IsFormInj } from '~/context' +import { ColumnInj, IsFormInj, MetaInj } from '~/context' import { provide, useProvideColumnCreateStore } from '#imports' -interface Props { - required?: boolean - column: ColumnType & { meta: any } -} - -const { column, required } = defineProps() - -provide(ColumnInj, column) +const props = defineProps<{ column: ColumnType & { meta: any }; required: boolean }>() const isForm = inject(IsFormInj) -const props = defineProps<{ column: ColumnType & { meta: any } }>() -const column = toRef(column, 'column') +const column = toRef(props, 'column') + provide(ColumnInj, column) + const { metas } = useMetas() + const meta = inject(MetaInj) const { isLookup, isBt, isRollup, isMm, isHm, isFormula, isCount } = useVirtualCell(column) diff --git a/packages/nc-gui-v2/components/smartsheet/Form.vue b/packages/nc-gui-v2/components/smartsheet/Form.vue index 6c35ccb7cd..ef8d756212 100644 --- a/packages/nc-gui-v2/components/smartsheet/Form.vue +++ b/packages/nc-gui-v2/components/smartsheet/Form.vue @@ -279,7 +279,7 @@ function onEmailChange() { } async function submitCallback() { - console.log("submitCallback") + console.log('submitCallback') await loadFormView() setFormData() showColumnDropdown.value = false