大约有 75 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0031 秒)
...毅 赞同来自: 可以再LayaAir.d.ts的(例如我自己的BaseView) declare module Laya{//在这个module里添加 class BaseView extends Scene{}//继承自Scene }里加上自己定义的页面,然后在编辑页面F9的Code导入类里写上引用和赋值 import BaseView from "...
来源: Laya_社区 发布时间: 20190417
使用layaide进行打包,提示如下错误。 Block-scoped declarations (let, const, function, class) not yet supported outside strict mode 网上搜索答案,有的说是因为在tsconfig中,将target调整成了es6就不可以运行了,但是我的代码使用了一些es6的特性,...
来源: Laya_社区 发布时间: 20170604
...如下: @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property(String) public text: string = ""; @property(Laya.Image) public image: Laya.Image = null; constructor() { super(); } } 附件 : -->...
来源: Laya_社区 发布时间: 20230412
...5311 关注: 3 人 懒货 • 2021-06-16 14:39 是把d.ts里的export改成declare吗,好神奇~为什么这样修改就好了,而github提供的别的ts使用却是export。不太理解 kura • 2021-06-17 17:46 @懒货:因为你已经从index.html导入过了 两种方式都可以用的 看需...
来源: Laya_社区 发布时间: 20210610
... 删掉 这样就和Laya库的格式比较像 只是多了个命名空间declare namespace autobahn { export class Session { id: number; realm: string; isOpen: boolean; features: any; ..................................然后在ts文件中 new autobahn.引用华丽丽的出现了 如果谁有更...
来源: Laya_社区 发布时间: 20180805
...看下么 kvs1205 • 2018-03-21 13:59 这里是 laya里面的点击事件 declare function goToNewWindow(url):void; { var url:string = "http://www.baidu.com"; goToNewWindow(url); } 这是index.html的js方法 <script> function goToNewWindow(payurl) { var a = $("<a href='&quo...
来源: Laya_社区 发布时间: 20180321
...("js to java"); js2java.back(); } //程序入口 new LayaUISample(); declare var js2java : any; ———————————————————————————————— 错误 05-17 11:33:53.949: E/LayaBox(31963): =====alert=js to java05-17 11:33:54.029: I/MonkVG(...
来源: Laya_社区 发布时间: 20170517
...perty } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let opendata = new Laya.OpenDataContextV...
来源: Laya3.0_文档 发布时间: 20251010
...regClass } = Laya; @regClass() export class DayNight extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.DirectionLight2D; private dayTime: number = 0; private dayDuration: number = 24; // 一个完整周期的秒数 private displayText: Laya.Text; // 文本显示当前时间 o...
来源: Laya3.0_文档 发布时间: 20251010
...} = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执...
来源: Laya3.0_文档 发布时间: 20251010