File tree Expand file tree Collapse file tree
components/ConsoleEditor/components/SelectBoundInfo
pages/main/workspace/components/WorkspaceTabs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 3.1.15
2+
3+ ` 2023-12-18 `
4+
5+ ** Changelog**
6+
7+ - 🐞【Fixed】Every time I open the application, I occasionally cannot select the database problem
8+ - 🐞【Fixed】Compatible with old data types can not show deletion problems
9+
110## 3.1.14
211
312` 2023-12-17 `
Original file line number Diff line number Diff line change 1+ ## 3.1.15
2+
3+ ` 2023-12-18 `
4+
5+ ** 更新日志**
6+
7+ - 🐞【修复】每次打开应用时,偶现无法选择数据库问题
8+ - 🐞【修复】兼容老数据类型无法显示删除问题
9+
10+
111## 3.1.14
212
313` 2023-12-17 `
Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ const SelectBoundInfo = memo((props: IProps) => {
5555
5656 const supportDatabase = useMemo ( ( ) => {
5757 return connectionList ?. find ( ( item ) => item . id === boundInfo . dataSourceId ) ?. supportDatabase ;
58- } , [ boundInfo . dataSourceId ] ) ;
58+ } , [ boundInfo . dataSourceId , connectionList ] ) ;
5959
6060 const supportSchema = useMemo ( ( ) => {
6161 return connectionList ?. find ( ( item ) => item . id === boundInfo . dataSourceId ) ?. supportSchema ;
62- } , [ boundInfo . dataSourceId ] ) ;
62+ } , [ boundInfo . dataSourceId , connectionList ] ) ;
6363
6464 // 编辑器绑定的数据库类型变化时,重新注册智能提示
6565 useEffect ( ( ) => {
@@ -105,8 +105,8 @@ const SelectBoundInfo = memo((props: IProps) => {
105105
106106 // 获取数据库列表
107107 const getDatabaseList = ( ) => {
108- if ( boundInfo . dataSourceId === undefined || boundInfo . dataSourceId === null ) {
109- return
108+ if ( boundInfo . dataSourceId === undefined || boundInfo . dataSourceId === null ) {
109+ return ;
110110 }
111111 connectionService
112112 . getDatabaseList ( {
@@ -134,8 +134,8 @@ const SelectBoundInfo = memo((props: IProps) => {
134134
135135 // 获取schema列表
136136 const getSchemaList = ( ) => {
137- if ( boundInfo . dataSourceId === undefined || boundInfo . dataSourceId === null ) {
138- return
137+ if ( boundInfo . dataSourceId === undefined || boundInfo . dataSourceId === null ) {
138+ return ;
139139 }
140140 connectionService
141141 . getSchemaList ( {
Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ const WorkspaceTabs = memo(() => {
102102 ) ;
103103 data . forEach ( ( item ) => {
104104 const editData = workspaceTabList ?. find ( ( t ) => t . id === item . key ) ;
105- if ( editData ?. type === WorkspaceTabType . CONSOLE ) {
105+ // table 为了兼容老数据
106+ if ( editData ?. type === WorkspaceTabType . CONSOLE || editData ?. type === 'table' as any ) {
106107 closeWindowTab ( item . key as number ) ;
107108 }
108109 } ) ;
@@ -212,6 +213,7 @@ const WorkspaceTabs = memo(() => {
212213 // 根据不同的tab类型渲染不同的内容
213214 const workspaceTabConnectionMap = ( item : IWorkspaceTab ) => {
214215 switch ( item . type ) {
216+ case 'table' as any : // 为了兼容老数据
215217 case WorkspaceTabType . CONSOLE :
216218 case WorkspaceTabType . FUNCTION :
217219 case WorkspaceTabType . PROCEDURE :
You can’t perform that action at this time.
0 commit comments