不被Cache,可以在Main.js的config內加入參數
urlArgs: "ver="+new Date().getTime()
則內部所有相依性的js檔案都會被統一在載入路徑後加入一個動態參數避免被Cache而若要讓Main.js不被Cache則需在載入main之前
先加入一段
var require = {
urlArgs : "v="+new Date().getTime()
};
urlArgs: "ver="+new Date().getTime()
則內部所有相依性的js檔案都會被統一在載入路徑後加入一個動態參數避免被Cachevar require = {
urlArgs : "v="+new Date().getTime()
};
1.在Project上開啟Property
2.Project Properties > JavaScript > Include Path > Source
3.選擇Excludsion/Edit
4.選擇要排除的目錄或檔案
@collection.comparator=(_model)=>
switch @sortType
when 'name'
_model.get('songName')
when 'artist'
_model.get('artistName')
when 'album'
_model.get('albumName')
3.設定監聽 當排序完成會被觸發@collection.comparator=(_model)=>
switch @sortType
when 'name'
_model.get('songName')
when 'artist'
_model.get('artistName')
when 'album'
_model.get('albumName')
4.執行排序@collection.sort()
isInit=true
loadSongData=function(){
var _async=true
if(this.isInit){
this.isInit=false
_async=false
}
_item.fetch({
success:function(data){
loadSong(data);
},
async:_async
})
}