我试图在我的类的窗体方法中调用一个邻近方法,如下面的示例所示。
import blah from './blaha';
export default class myclass{
constructor(con) {
this.config = con;
}
async meth1(paramA) {
//do_stuff...
}
meth2(paramB) {
//attempt to call meth1()
}
}
我想使用es6类样式从另一个方法中调用一个方法。
使用 this
import blah from './blaha';
export default class myclass{
constructor(con) {
this.config = con;
}
async meth1(paramA) {
//do_stuff...
}
meth2(paramB) {
this.meth1()
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句