mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 03:06:00 +00:00
refactor
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
for (const col of columns) {
|
||||
res.push(col);
|
||||
if (col.isExpanded) {
|
||||
processFlatColumns(res, col.childColumns);
|
||||
processFlatColumns(res, col.childNodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { PerspectiveTableColumnDefinition } from 'dbgate-datalib';
|
||||
import { getTableChildPerspectiveNodes, PerspectiveTableColumnNode } from 'dbgate-datalib';
|
||||
|
||||
import _ from 'lodash';
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
// $: console.log('viewInfo', $viewInfo);
|
||||
|
||||
function getTableColumns(table, dbInfo, config, setConfig) {
|
||||
return table.columns.map(col => new PerspectiveTableColumnDefinition(col, table, dbInfo, config, setConfig, null));
|
||||
return getTableChildPerspectiveNodes(table, dbInfo, config, setConfig, null);
|
||||
}
|
||||
|
||||
function getViewColumns(view, dbInfo, config, setConfig) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$: console.log('CFG', config);
|
||||
// $: console.log('CFG', config);
|
||||
|
||||
$: columns = $tableInfo
|
||||
? getTableColumns($tableInfo, $dbInfo, config, setConfig)
|
||||
|
||||
Reference in New Issue
Block a user