当我导入particles.js时,出现Cannot resolve file 'particles.js
错误。使用npm i particles.js
将粒子js安装到我的项目中,并将其添加到我的依赖项文件夹和package-lock文件夹中。
import {Component, Prop, Vue} from 'vue-property-decorator';
import ParticleJS from 'particles.js'
@Component
export default class ParticlesJS extends Vue {
name:'particlesJS'
mounted(){
console.log('mounted');
}
data(){
return{
user:{ firstName:'John', lastName:'Doe'},
}
}
}