更新 'SrcJyAlist.js'

master
src48597962 2 years ago
parent 27f1604a4a
commit 3b962e2e66
  1. 6
      SrcJyAlist.js

@ -44,10 +44,12 @@ function getlist(data,isdir) {
return isdir ? item.is_dir : fileFilter?contain.test(item.name):item.is_dir==0; return isdir ? item.is_dir : fileFilter?contain.test(item.name):item.is_dir==0;
}) })
list = list.sort((a,b)=>{ list = list.sort((a,b)=>{
let oDate1 = new Date(a.modified);
let oDate2 = new Date(b.modified);
if(a.modified!=b.modified){ if(a.modified!=b.modified){
return a.modified - b.modified return oDate2.getTime() > oDate1.getTime()
}else{ }else{
return a.name - b.name; return b.name - a.name;
} }
}); });
log(list); log(list);

Loading…
Cancel
Save