• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 13 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0042 秒)

1. 如何实现点击列表时,点击item中的按钮有事件,点击item其他位置没有事件,目前只能实现点击list里的item组件进行事件监听,没办法实现监听item中的button [ 100%]

...来自: 你可以针对item里面的组件单独设置事件,比如你在renderHandler渲染组件的时候,通过item拿到item里面的特定组件,然后加事件这里就不用说了,应该了解了!比如代码 方法一: function renderHandler(item:box,index:int):void { var button:...

来源: Laya_社区 发布时间: 20171128

2. 在微信小游戏中使用list,兼听不到mouseHandler跟selectHandler。 [ 94%]

...小游戏中使用list监听不到mouseHandler跟selectHandler,但是renderHandler的回调是正常的。1、我对list设置了on去监听mouse事件,可以触发回调 on 上面的回调, 2、listrenderHandler能正常使用 3、demo逻辑与官网给的代码是一样的 http://layaa...

来源: Laya_社区 发布时间: 20180731

3. 如何监听List滚动/拖动 [ 94%]

...果,详细一点,多谢 2.0 beta4 ts 含demo 在纵向滑动 listrenderHandler中给item中的Label组件赋值 字体被释放 问题状态 最新活动: 2017-05-25 13:52 浏览: 2513 关注: 2 人 zjw917329684 • 2017-05-25 15:34 我想要监听拖动开始和拖动结束 cuixueying • ...

来源: Laya_社区 发布时间: 20170525

4. 如何给 list 子元素里面的不同子元素添加点击事件 [ 93%]

...来自: 你可以针对item里面的组件单独设置事件,比如你在renderHandler渲染组件的时候,通过item拿到item里面的特定组件,然后加事件这里就不用说了 方法一: function renderHandler(item:box,index:int):void { var button:Button = item.getChildByName("but...

来源: Laya_社区 发布时间: 20180507

5. list item 添加事件后无法监听 [ 90%]

...;     list.selectHandler = new Handler(this, onSelect);      list.renderHandler = new Handler(this, updateItem);     return list; }  function updateItem(cell, index) {     console.log(index);     // console.log(cell.dataSource);     cell.setImg(cell.dataSource[index]);   ...

来源: Laya_社区 发布时间: 20180724

6. 分享:List组件下Item(Box)下的Button(或其他组件)进行监听[ 87%]

...list的显示 this.list.array = arr; //给list添加渲染函数 this.list.renderHandler = new Handler(this, onListRender); } //通过渲染函数Btn添加Click function onListRender(item, index) { var btn=item.getChildByName('btn'); btn.on(Event.CLICK,this,onClickBtn,[index]); } Laya.class(TestU...

来源: Laya_社区 发布时间: 20170513

7. 如何list内部的button添加事件 [ 83%]

...:24 浏览: 2575 关注: 3 人 cuixueying • 2017-01-05 22:10 你可以在renderHandler下或者selectHandler下,通过返回值index索引,去你的button添加点击事件即可,不需要遍历。 weiyongwill • 2017-01-06 10:56 多谢指点。list.getItem(xxx).getChildByName()无效,...

来源: Laya_社区 发布时间: 20170105

8. laya.ui.Tree [ 75%]

...轴心点会影响对象位置,缩放中心,旋转中心。Sprite  renderHandler : Handler Tree 实例的渲染处理器。 Tree right : Number 从组件右边到其内容区域右边之间的水平距离(以像素单位)。 UIComponent rotation : Number旋转角度,默认值0。...

来源: Laya2.0_api 发布时间: 20190513

9. laya.ui.Tree [ 74%]

...轴心点会影响对象位置,缩放中心,旋转中心。Sprite  renderHandler : Handler Tree 实例的渲染处理器。 Tree right : Number 从组件右边到其内容区域右边之间的水平距离(以像素单位)。 Component rotation : Number旋转角度,默认值0。...

来源: laya_api 发布时间: 20170929

10. laya.ui.List [ 68%]

...轴心点会影响对象位置,缩放中心,旋转中心。Sprite  renderHandler : Handler单元格渲染处理器(默认返回参数cell:Box,index:int)。List  repeatX : int 水平方向显示的单元格数量。 List  repeatY : int 垂直方向显示的单元格数量。 List right : N...

来源: Laya2.0_api 发布时间: 20190513