Browse Source

REPORT-112768 fix: 修复数据连接更新视图不同步问题

release/11.0
Austin.Duan 11 months ago
parent
commit
64d03f0782
  1. 10
      src/modules/pages/connection/connection.ts
  2. 2
      src/modules/pages/connection/list/list.model.ts

10
src/modules/pages/connection/connection.ts

@ -24,11 +24,15 @@ export class Connection extends BI.Widget {
title: HTapeLayout;
watch = {
connectionSelected: {
connectionSelectedOne: {
immediate: true,
handler: (name: string) => {
handler: (v: Connection) => {
BI.nextTick(() => {
name ? this.renderConnectionListView(name) : this.renderEmptyListView();
const connectionName = v.connectionName;
connectionName
? this.renderConnectionListView(connectionName)
: this.renderEmptyListView();
});
},
},

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

@ -44,7 +44,7 @@ export class ConnectionListModel extends Model<{
// 仅首次进入时从url中读取参数,其他情况保留选中状态
defaultDatabaseName ||= data.data[0].connectionName;
this.setSelectedConnection(this.model.connectionSelected || defaultDatabaseName);
this.setSelectedConnection(defaultDatabaseName);
}
return new Promise(resolve => {

Loading…
Cancel
Save