order softkey prefered

This commit is contained in:
Alessandro Francia
2018-07-19 09:00:43 +02:00
parent a84bfd3713
commit 597eabdff2
+14 -1
View File
@@ -142,7 +142,20 @@ export default {
return this.$store.state.machineInfo.heads;
},
softkeyFavorite: function(){
return this.$store.state.machineInfo.softkeysFavorites;
function compare(a,b){
if(a.id < b.id){
return -1;
}
if(a.id > b.id){
return 1;
}
return 0;
}
var array = this.$store.state.machineInfo.softkeysFavorites;
return array.sort(compare);
}
},
watch: