From c3ebdf5b8e721a71051493bc0cf91e569c347d05 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 1 Aug 2022 19:16:35 +0800 Subject: [PATCH 1/5] fix(gui-v2): email cell --- packages/nc-gui-v2/components/cell/Email.vue | 36 +++++++++----------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/Email.vue b/packages/nc-gui-v2/components/cell/Email.vue index 5e1e1c671d..8d81c0e3c1 100644 --- a/packages/nc-gui-v2/components/cell/Email.vue +++ b/packages/nc-gui-v2/components/cell/Email.vue @@ -2,40 +2,36 @@ import { computed } from '#imports' import { isEmail } from '~/utils' -const { modelValue: value } = defineProps() - -const emit = defineEmits(['update:modelValue']) - -const editEnabled = inject('editEnabled') - interface Props { modelValue: string } +interface Emits { + (event: 'update:modelValue', model: string): void +} + +const props = defineProps() + +const emits = defineEmits() + const root = ref() -const localState = computed({ - get: () => value, - set: (val) => emit('update:modelValue', val), -}) -const validEmail = computed(() => isEmail(value)) - +const editEnabled = inject('editEnabled') - From 92462166a8ca2c2109b5c69571c3e815700ab2d7 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 1 Aug 2022 19:27:24 +0800 Subject: [PATCH 2/5] fix(gui-v2): URL cell --- packages/nc-gui-v2/components/cell/Url.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/Url.vue b/packages/nc-gui-v2/components/cell/Url.vue index 44690332a1..24178d785a 100644 --- a/packages/nc-gui-v2/components/cell/Url.vue +++ b/packages/nc-gui-v2/components/cell/Url.vue @@ -8,11 +8,14 @@ interface Props { } const { modelValue: value } = defineProps() + const emit = defineEmits(['update:modelValue']) + const column = inject(ColumnInj) + const editEnabled = inject('editEnabled') -const localState = computed({ +const vModel = computed({ get: () => value, set: (val) => { if (!(column && column.meta && column.meta.validate) || isValidURL(val)) { @@ -24,19 +27,16 @@ const localState = computed({ const isValid = computed(() => value && isValidURL(value)) const root = ref() + onMounted(() => { root.value?.focus() }) From edbf01d019a30204aceb5b4f4e303ed3b1b14a15 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 1 Aug 2022 19:33:18 +0800 Subject: [PATCH 3/5] fix(gui-v2): wrap edit formula warning text --- packages/nc-gui-v2/components/virtual-cell/Formula.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui-v2/components/virtual-cell/Formula.vue b/packages/nc-gui-v2/components/virtual-cell/Formula.vue index 1e93f6ba00..ae5e223e24 100644 --- a/packages/nc-gui-v2/components/virtual-cell/Formula.vue +++ b/packages/nc-gui-v2/components/virtual-cell/Formula.vue @@ -35,7 +35,7 @@ const urls = computed(() => replaceUrlsWithLink(result.value))
{{ result }}
-
+
Warning: Formula fields should be configured in the field menu dropdown.
From 30143bbd77f7de76ffcf1e3f3a3a08246bcdce0d Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 1 Aug 2022 19:40:33 +0800 Subject: [PATCH 4/5] fix(gui-v2): fix email size --- packages/nc-gui-v2/components/cell/Email.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/Email.vue b/packages/nc-gui-v2/components/cell/Email.vue index 8d81c0e3c1..b7fc82de20 100644 --- a/packages/nc-gui-v2/components/cell/Email.vue +++ b/packages/nc-gui-v2/components/cell/Email.vue @@ -24,10 +24,10 @@ const validEmail = computed(() => isEmail(vModel.value))