From 937b418ee0f245fb61d1e3ef3b28a2296626dc50 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 30 Jul 2022 13:03:08 +0800 Subject: [PATCH] fix(gui-v2): replace formState by table from useTableCreate --- .../nc-gui-v2/components/dlg/TableCreate.vue | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/packages/nc-gui-v2/components/dlg/TableCreate.vue b/packages/nc-gui-v2/components/dlg/TableCreate.vue index 9466bd41f4..51da509f0b 100644 --- a/packages/nc-gui-v2/components/dlg/TableCreate.vue +++ b/packages/nc-gui-v2/components/dlg/TableCreate.vue @@ -53,23 +53,13 @@ const validateDuplicate = (v: string) => { const inputEl = ref() const useForm = Form.useForm -const formState = reactive({ - title: '', - table_name: '', - columns: { - id: true, - title: true, - created_at: true, - updated_at: true, - }, -}) const validators = computed(() => { return { title: [validateTableName, validateDuplicateAlias], table_name: [validateTableName], } }) -const { resetFields, validate, validateInfos } = useForm(formState, validators) +const { resetFields, validate, validateInfos } = useForm(table, validators) onMounted(() => { generateUniqueTitle() @@ -91,10 +81,10 @@ onMounted(() => { >
- +
{{ $t('activity.createTable') }}
@@ -133,17 +123,17 @@ onMounted(() => { - ID + ID - title + title - created_at + created_at - updated_at + updated_at