试用新版本…一些自动化的功能失效了…查了半天…
发现相同的一段代码…在不同版本运行会有2个结果…
class TestBase {
public numBase: number = 0;
public nodeBase: Node = null;
public on_TestBase() { }
}
class Test extends TestBase {
public num: number = 0;
public node: Node = null;
public on_Test() { }
}
@ccclass('Main')
export class Main extends Component {
public test: Test;
protected start() {
window['lv'] = this;
this.test = new Test();
for (const key in this.test)
console.log('forin', key, this.test[key]);
console.log('forin-end');
}
}


结果是3.4.1的class原型上的函数是无法forin出来的…
再经过一翻折腾…发现是函数上的可枚举被关了…
3.3.2

3.4.1

项目设置…tsconfig…都对比了个遍…没找到哪里设置的…
到底是我改了什么设置…还是你们改了什么设置
Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env (github.com)