Browse Source

fix: 删除数据连接时,默认选中列表的第一个

qufenxi
alan 5 years ago
parent
commit
5d60e02b66
  1. 2
      src/modules/pages/connection/list/list_item/list_item.model.ts

2
src/modules/pages/connection/list/list_item/list_item.model.ts

@ -102,7 +102,7 @@ export class ListItemModel extends Model<{
item.connectionData = JSON.parse(item.connectionData as string); item.connectionData = JSON.parse(item.connectionData as string);
}); });
if (name === this.model.connectionSelected) { if (name === this.model.connectionSelected) {
this.model.connectionSelected = ''; this.model.connectionSelected = BI.size(this.model.connections) > 0 ? this.model.connections[0].connectionName : '';
} }
api.shutdownConnectionStatus(name); api.shutdownConnectionStatus(name);
}); });

Loading…
Cancel
Save