Titanium 有人能告诉我如何重写tabopen方法吗

Titanium 有人能告诉我如何重写tabopen方法吗,titanium,appcelerator,titanium-mobile,appcelerator-titanium,appcelerator-mobile,Titanium,Appcelerator,Titanium Mobile,Appcelerator Titanium,Appcelerator Mobile,打开选项卡时 Ti.Ui.Tab.open(win) 我想做一些工作。我试过这样做 tabcomponent.open=函数(win){ //代码在这里 }; 但是没有起作用。有人能告诉我如何重写一个方法吗 提前感谢, Swathi。您不能覆盖默认功能。使用与默认函数名称不同的自定义函数扩展tabcomponent tabcomponent.openTab = function(win){ // Code goes here }; 您不能覆盖默认函数。使用与默认函数名称不同的自定义

打开选项卡时
Ti.Ui.Tab.open(win)
我想做一些工作。我试过这样做
tabcomponent.open=函数(win){
//代码在这里
};

但是没有起作用。有人能告诉我如何重写一个方法吗

提前感谢,


Swathi。

您不能覆盖默认功能。使用与默认函数名称不同的自定义函数扩展tabcomponent

tabcomponent.openTab = function(win){
     // Code goes here
 };

您不能覆盖默认函数。使用与默认函数名称不同的自定义函数扩展tabcomponent

tabcomponent.openTab = function(win){
     // Code goes here
 };