[]自己创建的box作为tab,为啥没有点击事件啊?
var Loader = laya.net.Loader;
var UI;
Laya.init(600, 400);
Laya.loader.load("res/atlas/template/comp.json", Laya.Handler.create(this, onAssetLoaded2), null, Loader.ATLAS);
function onAssetLoaded2()
{
Laya.class(MyBoot, "MyBootClass", MyPage2UI);
var UI = new MyBootClass();
Laya.stage.addChild(UI);
}
function MyBoot()
{
MyBoot.super(this);
this.MyTab.selectHandler = new Laya.Handler(this, onSelect, null, false);//设置 tab 的选择项发生改变时执行的处理器。
console.log("A123");
function onSelect(index)
{
console.log("当前选择的标签页索引: index= ", index);
}
}
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
cuixueying
赞同来自:
只支持 Button、radio、checkbox 具备点击状态的组件作为子项Item
lxm75
赞同来自: