Browse Source

Pull request #8720: REPORT-112768 fix: 修复数据连接更新视图不同步问题,同步final

Merge in DEC/decision-webui-dcm from ~AUSTIN.DUAN/decision-webui-dcm:final/11.0 to final/11.0

* commit 'e846f055ccf7ab5022151ff7140484a67c000891':
  REPORT-112768 fix: 修复数据连接更新视图不同步问题
final/11.0
Austin.Duan-段嗣跃 11 months ago
parent
commit
079aeab638
  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