From cdb67e51b5316ba40576456ee149422b0a0f6c3b Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 16 Apr 2021 14:10:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-51051=20feat:=20setSelect=E6=94=AF?= =?UTF-8?q?=E6=8C=81actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/tab.js | 4 ++-- typescript/base/combination/tab.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/base/combination/tab.js b/src/base/combination/tab.js index 637ee95f32..1aa075870d 100644 --- a/src/base/combination/tab.js +++ b/src/base/combination/tab.js @@ -83,10 +83,10 @@ BI.Tab = BI.inherit(BI.Widget, { } }, - setSelect: function (v) { + setSelect: function (v, action, callback) { this.tab && this.tab.setValue(v); this._assertCard(v); - this.layout.showCardByName(v); + this.layout.showCardByName(v, action, callback); this._deleteOtherCards(v); if (this.curr !== v) { this.curr = v; diff --git a/typescript/base/combination/tab.ts b/typescript/base/combination/tab.ts index db241022e4..0469a2f595 100644 --- a/typescript/base/combination/tab.ts +++ b/typescript/base/combination/tab.ts @@ -1,11 +1,12 @@ import { Widget } from "../../core/widget"; +import { Action } from "../../core/action/action"; export declare class Tab extends Widget { static xtype: string; static EVENT_CHANGE: string; - setSelect(v: string | number): void; + setSelect(v: string | number, action?: Action, callback?: Function): void; removeTab(v: string | number): void;