track.jsclass 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.jsimport Track from '../models/track';let a = new Track(1,2,3,4,5);报错谁给看看, 不知道什么原因。。。已经找到原因了, 忘记导出,在track.js最后加一行export default Track;
添加回答
举报
0/150
提交
取消