Browse Source

Pull request #288296: 无JIRA tab添加子card destory监听

Merge in DEC/fineui from ~DAILER/fineui-decision:release/11.0 to release/11.0

* commit '0395933470526e77d22f3d5d5fe81e9d021c7374':
  无JIRA tab添加子card destory监听
  Revert "Pull request #16: Feature/x"
  Revert "无JIRA layout 的updateChildren过程中传递context"
  无JIRA tab添加子card destory监听
  BI-154253 fix: 点击报错
  BI-154136 fix: 按钮被遮挡
  KERNEL-18940 refactor: 处理搜索,新增一些属性和方法
  BI-153053 fix: 展开的加载按钮异常
  BI-124572 fix: 过滤组件主题色修复
  KERNEL-18940 refactor: 类型补充
  KERNEL-18940 refactor: 新增一些属性和方法
  无JIRA layout 的updateChildren过程中传递context
  REPORT-125909 fix: 【公共模型引入BI】低版本chrome,维度指标集在组件分析区域不显示
master
Dailer-刘荣歆 3 months ago
parent
commit
14353b915c
  1. 9
      packages/fineui/src/base/combination/tab.js

9
packages/fineui/src/base/combination/tab.js

@ -13,7 +13,8 @@ import {
contains,
any,
isEqual,
LogicFactory
LogicFactory,
Events,
} from "@/core";
/**
@ -106,7 +107,11 @@ export class Tab extends Widget {
Widget.execWithContext(this, () => {
this.cardMap[v] = cardCreator(v);
});
this.layout.addCardByName(v, this.cardMap[v]);
const card = this.layout.addCardByName(v, this.cardMap[v]);
card.on(Events.DESTROY, () => {
this.layout.deleteCardByName(v);
delete this.cardMap[v];
});
}
}

Loading…
Cancel
Save