|
|
@ -31,12 +31,16 @@ export function useTable(onTableCreate?: (tableMeta: TableType) => void) { |
|
|
|
return table.columns.includes(col.column_name) |
|
|
|
return table.columns.includes(col.column_name) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const tableMeta = await $api.dbTable.create(project?.value?.id as string, { |
|
|
|
try { |
|
|
|
...table, |
|
|
|
const tableMeta = await $api.dbTable.create(project?.value?.id as string, { |
|
|
|
columns, |
|
|
|
...table, |
|
|
|
}) |
|
|
|
columns, |
|
|
|
|
|
|
|
}) |
|
|
|
onTableCreate?.(tableMeta) |
|
|
|
onTableCreate?.(tableMeta) |
|
|
|
|
|
|
|
} catch (e: any) { |
|
|
|
|
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
|