需要加載一些圖片和音頻資源,偽代碼如下:data () { assets: [] },methods :{ getAssets () { var que = new createjs.LoadQueue(true); que.setMaxConnections(5); que.on('fileload', this.handleFileLoad, this); que.on('complete', this.createLoading, this); }, handleFileLoad (event) { this.assets[event.item.id] = event; //這里根本進不來 }, createLoading (e) { // ... }}不知道是不是vuecomponent對象中傳入的this的問題,求解。
在vue中使用preloadjs加載文件,fileload事件無效,從而導致complete事件也無
慕標琳琳
2018-11-13 13:46:55