order softkey prefered
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user