Browse Source

fix: key naming for column name

pull/1931/head
Wing-Kam Wong 3 years ago
parent
commit
6be9663a6c
  1. 4
      packages/nc-gui/components/import/templateParsers/ExcelTemplateAdapter.js
  2. 2
      packages/nc-gui/components/templates/createProjectFromTemplateBtn.vue

4
packages/nc-gui/components/import/templateParsers/ExcelTemplateAdapter.js

@ -79,8 +79,8 @@ export default class ExcelTemplateAdapter extends TemplateGenerator {
columnNamePrefixRef[cn] = 0
const column = {
cn,
refCn: cn
column_name: cn,
ref_column_name: cn
}
table.columns.push(column)

2
packages/nc-gui/components/templates/createProjectFromTemplateBtn.vue

@ -198,7 +198,7 @@ export default {
remapColNames(batchData, columns) {
return batchData.map(data => (columns || []).reduce((aggObj, col) => ({
...aggObj,
[col.column_name]: data[col.refCn]
[col.column_name]: data[col.ref_column_name]
}), {})
)
}

Loading…
Cancel
Save