methods:
desc(a,b){ //降序
return b.value-a.value
},
asce(a,b){ //升序
return a.value-b.value
},
mounted:
let arr=[{name:'回复',value:'23'},{name:'是的',value:'13'},{name:'荣誉',value:'63'},{name:'萨的',value:'43'},{name:' 许三多',value:'93'},{name:'二位',value:'22'}]
let str=arr.sort(this.desc) //降序
console.log(str)
运行结果: