大约有 481 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)
...基类的组件,报错说未定义。 export default class GameLoading extends ui.gamoloadingUI{ constructor(){ super(); this.PB.changeHandler = new Laya.Handler(this,this.onChange); } } 基类中明确有PB变量,是进度条。此处构造函数中设置事件报错,说PB未定义,但是...
来源: Laya_社区 发布时间: 20181225
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Handler.create(this, this.onSuccess), Laya.Handler.create(this, this.o...
来源: Laya3.0_文档 发布时间: 20251010
...nHead { import laya.ui.*; import laya.display.*; public class MainHeadUI extends View { public var image1:Image; public var input:TextInput; public var combox:ComboBox; public var radio:RadioGroup; public var checkBox:CheckBox; public var gongji:Button; public var btn1HasLabel:Button; public stati...
来源: Laya_社区 发布时间: 20180327
... = $.timer(0, 500); } //一个 View @createView(TEST_PAGE) class HelloView extends VmViewBase<HelloViewModel> { //绑定 viewModel 的 hello$ 的值到 lbHello.text @vmBindLabel('hello$') lbHello: Laya.Label; }现实中的应用:绑定 List 和 Tab 现实中的应用:登录页面 附件...
来源: Laya_社区 发布时间: 20180128
...nd class laya.ani.bone.Skeleton Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent Uncaught TypeError: Class constructor Component cannot be invoked without 'new' 做微信开放域遇到Uncaught Can not find class laya.ui.WXOpenDataViewer 做微信开放域遇到Uncaught Can...
来源: Laya_社区 发布时间: 20170406
...类似如下代码: module ui.coreUI { export class TestUI extends View{ // do something... } } 我在其它包的类中通过 import TestUI = ui.coreUI.TestUI ; 方式引入类 定义时报错: "Uncaught ReferenceError: ui is not defined" ...
来源: Laya_社区 发布时间: 20170424
... • 2018-10-25 14:56 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在...
来源: Laya_社区 发布时间: 20181025
...本。 > **脚本类**: ```typescript export default class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(){ this.meshsp ...
来源: Laya2.0_文档 发布时间: 20210715
为什么hitTestPoint始终是false? class TestUI extends Laya.Sprite { private s:Laya.Sprite = new Laya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } priv...
来源: Laya_社区 发布时间: 20170319
...** *ImageRunTime逻辑类 * @author mengjia * */ public class ImageRunTime extends Image { //缩放时间100毫秒 public var scaleTime:int = 100; public function ImageRunTime() { //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮...
来源: Laya2.0_文档 发布时间: 20210714