diff --git a/packages/nc-gui-v2/components/template/Editor.vue b/packages/nc-gui-v2/components/template/Editor.vue index be0b5ece0f..161a12872b 100644 --- a/packages/nc-gui-v2/components/template/Editor.vue +++ b/packages/nc-gui-v2/components/template/Editor.vue @@ -9,6 +9,8 @@ import MdiStringIcon from '~icons/mdi/alpha-a' import MdiLongTextIcon from '~icons/mdi/text' import MdiNumericIcon from '~icons/mdi/numeric' import MdiPlusIcon from '~icons/mdi/plus' +import MdiKeyStarIcon from '~icons/mdi/key-star' +import MdiDeleteOutlineIcon from '~icons/mdi/delete-outline' interface Props { quickImportType: string @@ -35,6 +37,10 @@ const tableColumns = [ dataIndex: 'column_type', key: 'column_type', }, + { + name: 'Action', + key: 'action', + }, ] const project = reactive({ @@ -60,7 +66,10 @@ const parseTemplate = ({ tables = [], ...rest }: Record) => { ({ manyToMany = [], hasMany = [], belongsTo = [], v = [], columns = [], ...rest }: Record) => ({ ...rest, columns: [ - ...columns, + ...columns.map((c: any, idx: number) => { + c.key = idx + return c + }), ...manyToMany.map((mm: any) => ({ column_name: mm.title || `${rest.table_name} <=> ${mm.ref_table_name}`, uidt: LinkToAnotherRecord, @@ -212,7 +221,12 @@ const getIcon = (type: string) => { - + -
+