this.rightDataItem = [ { name: '微信', color: '#06E1AE', money: formatMoney(dataRight.wx) }, { name: '支付宝', color: '#0495FE', money: formatMoney(dataRight.ali) }, { name: 'PayPal', color: '#FFC300', money: formatMoney(dataRight.paypal) }, { name: '转账汇款', color: '#FF9403', money: formatMoney(dataRight.transfer) }, { name: '线下付款', color: '#B1B2FE', money: formatMoney(dataRight.offline) }, { name: '钱包支付', color: '#F0579A', money: formatMoney(dataRight.wallet) } ] this.rightDataItem = this.rightDataItem.sort(this.sortDownDate)
方法:
sortDownDate(a, b) { return (b.money) - (a.money) },