Browse Source

fix(gui-v2): add missing []

pull/2828/head
Wing-Kam Wong 2 years ago
parent
commit
65aef10f77
  1. 6
      packages/nc-gui-v2/components/template/Editor.vue

6
packages/nc-gui-v2/components/template/Editor.vue

@ -91,11 +91,11 @@ onMounted(() => {
const validators = computed(() => { const validators = computed(() => {
let res: any = {} let res: any = {}
for (let tableIdx = 0; tableIdx < data.tables.length; tableIdx++) { for (let tableIdx = 0; tableIdx < data.tables.length; tableIdx++) {
res[`tables.${tableIdx}.table_name`] = fieldRequiredValidator res[`tables.${tableIdx}.table_name`] = [fieldRequiredValidator]
hasSelectColumn.value[tableIdx] = false hasSelectColumn.value[tableIdx] = false
for (let columnIdx = 0; columnIdx < data.tables[tableIdx].columns.length; columnIdx++) { for (let columnIdx = 0; columnIdx < data.tables[tableIdx].columns.length; columnIdx++) {
res[`tables.${tableIdx}.columns.${columnIdx}.column_name`] = fieldRequiredValidator res[`tables.${tableIdx}.columns.${columnIdx}.column_name`] = [fieldRequiredValidator]
res[`tables.${tableIdx}.columns.${columnIdx}.uidt`] = fieldRequiredValidator res[`tables.${tableIdx}.columns.${columnIdx}.uidt`] = [fieldRequiredValidator]
if (isSelect(data.tables[tableIdx].columns[columnIdx])) { if (isSelect(data.tables[tableIdx].columns[columnIdx])) {
hasSelectColumn.value[tableIdx] = true hasSelectColumn.value[tableIdx] = true
} }

Loading…
Cancel
Save