提交 cc02786f 编写于 作者: Mosher's avatar Mosher

update:更新

上级 bbdf29bc
...@@ -27,6 +27,7 @@ export class PanelTabPageModel extends PanelDetailModel { ...@@ -27,6 +27,7 @@ export class PanelTabPageModel extends PanelDetailModel {
*/ */
constructor(opts: any = {}) { constructor(opts: any = {}) {
super(opts); super(opts);
this.details = opts.details;
} }
/** /**
......
...@@ -28,10 +28,10 @@ export class PanelTabPanelModel extends PanelDetailModel { ...@@ -28,10 +28,10 @@ export class PanelTabPanelModel extends PanelDetailModel {
/** /**
* 分页子成员 * 分页子成员
* *
* @type {any[]} * @type {string[]}
* @memberof PanelTabPanelModel * @memberof PanelTabPanelModel
*/ */
public tabPages: any[] = []; public details: string[] = [];
/** /**
* Creates an instance of PanelTabPanelModel. * Creates an instance of PanelTabPanelModel.
...@@ -42,10 +42,7 @@ export class PanelTabPanelModel extends PanelDetailModel { ...@@ -42,10 +42,7 @@ export class PanelTabPanelModel extends PanelDetailModel {
*/ */
constructor(opts: any = {}) { constructor(opts: any = {}) {
super(opts); super(opts);
this.tabPages = [...opts.tabPages]; this.details = opts.details;
if (this.tabPages.length > 0) {
this.activiedPage = this.tabPages[0].name;
}
} }
/** /**
...@@ -57,20 +54,20 @@ export class PanelTabPanelModel extends PanelDetailModel { ...@@ -57,20 +54,20 @@ export class PanelTabPanelModel extends PanelDetailModel {
if (!this.panel) { if (!this.panel) {
return; return;
} }
const detailsModel: any = this.panel.detailsModel; const detailsModel: any = this.panel.layoutModelDetails;
const index = this.tabPages.findIndex((tabpage: any) => Object.is(tabpage.name, this.clickActiviePage) && Object.is(tabpage.name, this.activiedPage) && detailsModel[tabpage.name].visible); // const index = this.tabPages.findIndex((tabpage: any) => Object.is(tabpage.name, this.clickActiviePage) && Object.is(tabpage.name, this.activiedPage) && detailsModel[tabpage.name].visible);
if (index !== - 1) { // if (index !== - 1) {
return; // return;
} // }
this.tabPages.some((tabpage: any) => { // this.tabPages.some((tabpage: any) => {
if (detailsModel[tabpage.name].visible) { // if (detailsModel[tabpage.name].visible) {
this.activiedPage = tabpage.name; // this.activiedPage = tabpage.name;
return true; // return true;
} // }
return false; // return false;
}); // });
} }
/** /**
...@@ -84,7 +81,6 @@ export class PanelTabPanelModel extends PanelDetailModel { ...@@ -84,7 +81,6 @@ export class PanelTabPanelModel extends PanelDetailModel {
if (!$event) { if (!$event) {
return; return;
} }
this.clickActiviePage = $event; this.clickActiviePage = $event;
this.activiedPage = $event; this.activiedPage = $event;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册