File tree Expand file tree Collapse file tree
chat2db-client/src/pages/main/workspace/components/TableList Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import OperationLine from '../OperationLine';
1010import Tree from '@/blocks/Tree' ;
1111import { treeConfig } from '@/blocks/Tree/treeConfig' ;
1212import { ITreeNode } from '@/typings' ;
13+ import { TreeNodeType } from '@/constants' ;
1314
1415interface IProps {
1516 className ?: string ;
@@ -28,8 +29,9 @@ export default memo<IProps>((props) => {
2829 setTreeData ( [ ] ) ;
2930 return ;
3031 }
32+ const treeNodeType = currentConnectionDetails . supportDatabase ? TreeNodeType . DATA_SOURCE : TreeNodeType . DATABASE ;
3133 setTreeData ( null ) ;
32- treeConfig [ 'dataSource' ]
34+ treeConfig [ treeNodeType ]
3335 . getChildren ?.( {
3436 dataSourceId : currentConnectionDetails . id ,
3537 dataSourceName : currentConnectionDetails . alias ,
@@ -55,7 +57,6 @@ export default memo<IProps>((props) => {
5557 return (
5658 < div className = { classnames ( styles . treeContainer , className ) } >
5759 < OperationLine getTreeData = { getTreeData } searchValue = { searchValue } setSearchValue = { setSearchValue } />
58- { /* <Tree className={styles.treeBox} searchValue={searchValue} treeData={treeData} /> */ }
5960 < Tree className = { styles . treeBox } searchValue = { searchValue } treeData = { treeData } />
6061 </ div >
6162 ) ;
You can’t perform that action at this time.
0 commit comments