I want to use a javascript class in may Vue application.
My class looks like:
class className {
constructor() {
...
}
function1() {
...
}
static funtion2() {
...
}
}
I tried to import this class in my application like:
- import className from './fileName.js';
- var {className} = require('./fileName.js')
In all cases I receive when I want to call a function of the class (className.function2()
): the function is undefined.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…