track.js
class Track {
constructor(title, artist, album, albumArt, audio) {
this.title = title;
this.artist = artist;
this.album = album;
this.albumArt = albumArt;
this.audio = audio;
};
returnValue(){
return(
{
title: this.title,
artist: this.artist,
album: this.album,
audio: this.audio,
albumArt: this.albumArt,
}
)
}
}
search.js
import Track from '../models/track';
let a = new Track(1,2,3,4,5);
报错
谁给看看, 不知道什么原因。。。
已经找到原因了, 忘记导出,在track.js最后加一行export default Track;
长风秋雁
相关分类